By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

Sendig emails with MAPISendMail (Mapi32.dll)

P: 2
Hi,

I am doing an application that among other functions sends emails with Microsoft Outlook using the MAPISendMail API call.

I have two problems :
First, I would like to change the email format to HTML or at least Rich Text Format. What I can do now is text only. Is it possible?
Second, I would like to use the predefined signatures in Microsoft Outlook. The email generated by my application donít use the signatures.

My application is developped in Microsoft Access 2002.

Thank you for your help
Dec 5 '06 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,660
You can try with the SendObject Method.
For full help type SendObject in your code somewhere and hit F1 for context-sensitive help.
SendObject Method


The SendObject method carries out the SendObject action in Visual Basic. For more information on how the action and its arguments work, see the action topic.

Syntax

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

The SendObject method has the following arguments.

Argument Description

objecttype One of the following intrinsic constants:
acSendDataAccessPage
acSendForm
acSendModule
acSendNoObject (default)
acSendQuery
acSendReport
acSendTable
objectname A string expression that's the valid name of an object of the type selected by the objecttype argument. If you want to include the active object in the mail message, specify the object's type with the objecttype argument and leave this argument blank. If you leave both the objecttype and objectname arguments blank (the default constant, acSendNoObject, is assumed for the objecttype argument), Microsoft Access sends a message to the electronic mail application without an included database object.
If you run Visual Basic code containing the SendObject method in a library database, Microsoft Access looks for the object with this name first in the library database, then in the current database.
outputformat One of the following intrinsic constants:
acFormatDAP
acFormatHTML
acFormatRTF
acFormatTXT
acFormatXLS
If you leave this argument blank, Microsoft Access prompts you for the output format.
to A string expression that lists the recipients whose names you want to put on the To line in the mail message.
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. If the recipient names aren't recognized by the mail application, the message isn't sent and an error occurs.
If you leave this argument blank, Microsoft Access prompts you for the recipients.
cc A string expression that lists the recipients whose names you want to put on the Cc line in the mail message. If you leave this argument blank, the Cc line in the mail message is blank.
bcc A string expression that lists the recipients whose names you want to put on the Bcc line in the mail message. If you leave this argument blank, the Bcc line in the mail message is blank.
subject A string expression containing the text you want to put on the Subject line in the mail message. If you leave this argument blank, the Subject line in the mail message is blank.
messagetext A string expression containing the text you want to include in the body of the mail message, after the object. If you leave this argument blank, the object is all that's included in the body of the mail message.
editmessage Use True (Ė1) to open the electronic mail application immediately with the message loaded, so the message can be edited. Use False (0) to send the message without editing it. If you leave this argument blank, the default (True) is assumed.
templatefile 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.
Dec 5 '06 #2

P: 2
Hi,

Thank you for your help. It works.
Dec 7 '06 #3

NeoPa
Expert Mod 15k+
P: 31,660
Hi,

Thank you for your help. It works.
No Problem.
We're here to serve.
(Cuppa anyone :))
Dec 7 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.