Hi all, I’m trying to send out emails from access using the SendObject ject acReport, StDocName. This code brings up the email client . SendObject acReport, stDocName, acFormatPDF, _ stRecipients, stDocName = “License CODs” stRecipietns = stRecipients DoCmd. ject acSendReport, stDocName, acFormatPDF, “”,,, “Emailing” & ” ” & strFileName ‘Close the Report acReport.
|Published (Last):||20 February 2007|
|PDF File Size:||9.31 Mb|
|ePub File Size:||13.62 Mb|
|Price:||Free* [*Free Regsitration Required]|
If you want to specify reply to you’d need to use CDO to send Acreporh happy to be found wrong on all of these: I will work up some examples after I get some sleep.
It will go into the sent box of the current user I think.
If you leave this argument blank, Microsoft Access prompts you for the recipients. When you send a datasheet, form, or data access page in HTML format, one.
If your recordset holds one row for each recipient you want to email, walk the recordset to gather them instead of reading only the recipient from the first row.
TemplateFile Optional Variant A string expression that’s the full name, including the path, of the file you want to use as a template for an HTML file. AddAttachment attachment file path an name. A string expression that lists the recipients whose names you want to put on the Bcc line in the mail message. You can include objects in Microsoft Excel Subject Optional Variant A string expression containing the text you want to put on the Subject line in the mail message.
A constant that specifies the format in which to send the object. Outlook has no problem establishing multiple accounts, each with their respective “Send As” options.
Yes you do need the password or you’d be able to send ‘from’ any body. You can send table, query, and form datasheets. Ask a Question Want to reply to this thread or ask your own question?
I dont see the need for ALL this code. Thanks again for the tip! Marilyn Myers, Dec 23, The other times docmd.seneobject opens with the same filter setting as the last button press. Hi Gab-Hop, if I remember well, it’s only possible to set up one outlook sender for one profile on your pc. Email Required, but never shown. Jeff Hunt, Sep 3, When you send a report in HTML format, one.
The following rules apply when you use the SendObject action to include a database object in a mail message:.
What am I doing wrong? I did not have any issues with warnings, security or otherwise. After that, you can post your question and our members will help you out. I was docmdd.sendobject the filter in code because it can change based on what is selected in the form.
OutputFormat Optional Variant A constant that docmd.sendbject the format in which to send the object. A string expression that’s the valid name of an object of the type selected by the ObjectType argument. The following example shows how to create an email message with Microsoft Outlook and display it to the user. Sendobject with multiple reports.
So the message itself will start with Sent From whoever is logged on to the PC It may be possible to use ‘sentfrom using CDO but I seem to recall that the best you can do with that is to set up a ‘reply to’. I was able to get this to work in an dtdocname. The following code example includes the Employees table in a mail message in Microsoft Excel format and specifies ToCcand Subject lines in the mail message. Docmd.sendobmect as a guest Name. Results 1 to 15 of When the filter fails, it also does not open in Hidden mode.
All other controls are ignored. Subreports are included in the object. In the included object, all fields in the datasheet look as they do in Docmd.sendobnect, except fields containing OLE objects. Page 1 of 2 1 2 Last Jump to page: I think you’ll docm.sendobject that sent on behalf of doesn’t work unless the other account is set up. I have a report that I can open using DoCmd. Made a new DB.
Does being 32bit or 64bit effect the code 3. Sign in to give feedback. A string expression that’s the full name, including the path, of the file you want to use as a template for an HTML file.
A string expression that lists the recipients whose names you want to put on the To line in the mail message. I added acHidden to the open report so the users don’t see the report before it goes right into an email. A string expression containing the text docmd.sendboject want to put on the Subject line in the mail message.
All times are GMT Separate the recipient names you specify in this argument and in the cc and bcc arguments with a semicolon ; or with the list separator set on the Number tab of the Regional Settings Properties dialog box in Windows Control Panel.
This works in Access andand I believe its the same code I used in at another job. I guess I can just use the OutputTo acReport to a predefined location and use it as the attachment.