Sending more than one object in the same makro

L

Leif Thorsen

Is there a way to send 2 reports in the same using the command "SendObjekt"
?? When using the makro I only have the possibility to choose between one of
all reports I have made but I am in a need to attache two of my reports.
Thank You in advance for an answer
 
T

Tony Toews [MVP]

Leif Thorsen said:
Is there a way to send 2 reports in the same using the command "SendObjekt"
?? When using the makro I only have the possibility to choose between one of
all reports I have made but I am in a need to attache two of my reports.

You can't send more than one Access object using SendObject. You will
need to use VBA and another means of sending emails.

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tom Wickerath

Hi Leif,

No. The SendObject method can only be used to send one object at a time. One
option might be to create a new blank report, and then insert the two reports
as subreports to this new report. That way, when you send the new report, it
would include the content of both reports.

Another method would involve first exporting your report to a folder on your
hard drive, using the appropriate format (for example, the portable document
format [.pdf] or the Microsoft Access Snapshot format [.snp]). Then use VBA
code with Outlook (not Outlook Express) to send the saved files to the
reciepient. An example of doing that is shown on page 19 of a document that I
call Access Links.doc. You are welcome to download a zipped copy from here:

http://www.accessmvp.com/TWickerath/downloads/accesslinks.zip

Look for the topic: "Late Bound code for Outlook to send several file
attachments."


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
L

Leif Thorsen

Tony Toews said:
You can't send more than one Access object using SendObject. You will
need to use VBA and another means of sending emails.

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Thank Yuo for Your rapid answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top