Excel contents to Outlook email

  • Thread starter Thread starter Mohan Manicks
  • Start date Start date
M

Mohan Manicks

Hi,

Is there a way to get the contents (few cell values) form
an Excel worksheet into a new outlook email throug VBA. I
don't want to attach the entire file.

Also, is there a way to get the file size (in KB) into
Excel sheet through VBA. I am already opening this text
file and copying the contents into the excel sheet through
VBA. I also want to get the file size.

Any help would be appreciated.

Thank you.
 
Mohan

For Outlook emails see these sites. If you can't find your answer there,
post back

www.dicks-clicks.com


For file size, you can use the FileSystemObject. Set a reference to
Microsoft Scripting Runtime and you can get the size like this example

Sub test()

Dim fso As FileSystemObject
Dim FileSize As Double

Set fso = New FileSystemObject

FileSize = fso.GetFile("C:\Dick\CharityFormulas.txt").Size

MsgBox FileSize \ 1000

End Sub
 
Mohan said:
I also want to get the file size.

Simplest way for file size is

FileSize = FileLen("C:\MyDir\Myfile.xls")

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
Back
Top