Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Access report as body of Lotus email instead of attachment

Status
Not open for further replies.

Kristoph

Technical User
Jul 29, 2008
9
US
Hello,

I am a beginner with VB, but have used Access regularly for a couple of years. I have searched through this forum as well as others and have found some excellent code (Thank you!!!). However, I have not been able to translate or find the right code for this task: Automatically send a report as text in the body of a Lotus Notes email.

Here is what I have so far:

A Form with combo boxes dependant on each other.
A Button on the same form that runs a Report. The Report is dependant on a query that looks for the last combo box selection. The button is clicked, it opens a new Lotus Notes email, Runs the Report/Query, automatically attaches the Report as a .txt file to the email, and it's good to go!! But, I'd like to force the .txt Report to be the body of the email, not an attachment.

I am using doCmd.SendObject behind the button to open the email, run the report, format to text, and attach the file.

Any advice is greatly appreciated. Thank you.

-Kristoph
 
Well, according to the help file, all you gotta do is specify the text.
helpfile said:
SendObject Method
See AlsoApplies ToExampleSpecificsThe SendObject method carries out the SendObject action in Visual Basic.

expression.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject, MessageText, EditMessage, TemplateFile)

So, what you would have to do is parse the text that is going into your text file into a string variable instead, and then that string will be set as the MessageText for your email (or added to the MessageText string for your email).

--

"If to err is human, then I must be some kind of human!" -Me
 
Thank you kjv1611,

I will look closely at the help file and your notes above to see if I can get it to work.

Thank you.

-Kristoph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top