sending emails from access

  • Thread starter Thread starter sam
  • Start date Start date
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
 
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.
 
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
 
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.
 
Back
Top