Excel Mail - through VB

stoffie
06-04-2001, 08:28 AM
How do I mail a Excel Sheet through VB. Not as an attachment

jerryfchui
06-04-2001, 07:30 PM
What is your problem? Do you
1. have problem in extracting data from an Excel worksheet, or
2. do you have problem in inserting body texts onto a email you want to send via VBA

I had used ole to achieve function no 1 before. I got my information via an example in the MS knowledge base. Try searching with subject similar to 'ole automation'. Accessing data of an Excel file via vba is not difficult.

For function no2. The syntax of the sendObject method of the docmd object is:

DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]

The content of messagetext (data type String) can be set by your program, based on data extracted from an excel spreadsheet. The string messageText can contain chr$(13) which is 'new line'.

The maximum length of messagetext should be large enough for general application.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum