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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access & VB - docmd.sendobject

Status
Not open for further replies.

cichlid

Technical User
Oct 11, 2000
61
GB
I have a line in my code that sends a report (as .rtf) to a list of people using outlook - it all works perfectly except for one thing - i want to add in From: as a number of people will be using the database but i want the e-mail to appear to come from a shared/group mailbox (we all have permissions for it) - anyone any ideas - the syntax for the command in access doesnt seem to allow for From:

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

Sorry I can't help but I was wondering what your code to send to a list looks like. I am trying to do the same thing and can't quite get it.

Thank you,

Henry
 
the following is attached to a button (on click)
i have a report called daily report which gets email to a list of people each morning - this button sends it out as a .rtf file using outlook (I always have outlook open when i click it) - all the recipients are within our exchange organisation so the address are just the ones from our global address list but external ones can be added. The subject is Daily Report and the body is just 'see attached'.

DoCmd.SendObject acSendReport, "Daily Report", acFormatRTF, "Jones John; cichlid000@hotmail", , , "Daily Report", "See attached.", No

you can get the full syntax in the help file - it will tell you what the blanks between the commas are for in case you need them.

if you need any other help drop me a mail cichlid000@hotmail.com
 
Thanks! Would you have any information on how to make the "To" part be dynamic. For instance, I have a subform that lists project stakeholders that need to get information weekly on project status. Stakeholders change from project to project. How can I use the stakeholders e-mail addresses as a variable in the "To" part of the SendObject Method?

Regards,

Henry
 
off the top of my head . . :)
you could put a control on a form that strings all the email addresses from a table into one variable and add it into the command line or . .
send to distribution list - how frequently would the list change?
 
Henry:

I use this method quite a bit to e-mail reports to a number of staff; report distribution depends on staff function.

I had our IT staff create mail groups on the Exchange server and use the group as the To argument. Since all of the reports are run from a common menu system I created a table that lists the Report Name and the mail group then query the table (based on report selected from the menu) to identify the group.

Hope this helps.
Larry De Laruelle
larry1de@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top