sending emails from access

S

sam

i have 3 issues with sending emails from access through outlook:
1. outlook reports that the email has not been sent even it is in the sent
items
folder.
2. how can i design the email from access (font, color, align). ?
3. how can i use a word document as a template for emails design for sending
emails from access?
thanks
 
K

Ken Slovak - [MVP - Outlook]

Using DoCmd to create/send the email? That uses Simple MAPI and you have
very little control over the mail format or whether it appears sent to
Outlook. Simple MAPI also won't use WordMail even if Outlook is set to use
it in versions prior to Outlook 2007.

To get more granular control over your email you'd have to use the Outlook
object model to create your email. Then you can use Word or HTML formatting
to make it look like you want it to look.
 
S

sam

thanks for the reply
i'm useing the Outlook object model. i need help in 2 issues:
1. how to use Word or HTML formatting
2. how to avoid from outlook report that the email has not been sent

thanks again
 
K

Ken Slovak - [MVP - Outlook]

For HTML emails you just construct what you want as valid HTML text, bearing
in mind the HTML limitations in Outlook, and then set the HTMLBody property
of the email to your HTML. Or you can get HTMLBody as a text string and
parse it as HTML and add whatever you want to the existing HTML string, then
replace HTMLBody.

For WordMail you can do the exact same thing as for Outlook editor HTML, or
you can use Word code to open a Word template and populate it with whatever
text you want in the Word.Document. Then you can either get the contents of
the Document as text and set Body or HTMLBody (depending on the mail
format), or you can use the fact that Inspector.WordEditor is actually a
Word Document object to set up the email contents.
 

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