Email Templates from Access

C

CaptainBly

I have in several different applications set up the ability for a
customer to send emails from the application.

My application creates an instance of outlook. Creates an email.
Adds necessary email addresses. Adds attachments where applicable.
Adds subject and body text and sends.

That all works great.

The emails that generate are very simple plane text emails though. I
have a customer that would like it to either use the email template
like Outlook does with their signature etc... on the generated emails
from Access.

They would also like the ability to "pretty up" the email. Use
different fonts. Different colors. Etc...

The first portion is more important. Is there a way to get their
signature on an email? To use the same blank template that they see
when they just generate an email in outlook?

Is there a way to specify fonts an colors and make my email creator a
little more flexible?

Any help is greatly appreciated
 
A

Arvin Meyer [MVP]

There probably is a way, but you will need to use Outlook's object model.
One thing to think of when generating the email is flexibility. Hard coding
things like fonts and colors actually make the code less flexible. Allowing
the users to control those things (which they should be able to do now if
you turn the Outlook.Display property on and the Outlook.Send property off)
can be done in the Outlook interface instead. If you still want to do it in
code, with some research and experimentation, one of us may be able to help
you do that, but I'd bet that an Outlook MVP could show you more easily.
 
C

CaptainBly

There probably is a way, but you will need to use Outlook's object model.
One thing to think of when generating the email is flexibility. Hard coding
things like fonts and colors actually make the code less flexible. Allowing
the users to control those things (which they should be able to do now if
you turn the Outlook.Display property on and the Outlook.Send property off)
can be done in the Outlook interface instead.  If you still want to do it in
code, with some research and experimentation, one of us may be able to help
you do that, but I'd bet that an Outlook MVP could show you more easily.
--
Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com













- Show quoted text -

The problem is that it might be sending 1000 emails to their customer
database. I have a function that lets them query their data set and
one of the things they can do with it is send an email. I can
obsolutely use the display option and let them pen the email in
outlook which would give them total flexibility to do this but they
would have to do it with every single email. This is a marketing
system sending standard emails programatically to records in the
database. If it was a single email, that would be different but I
need to collect the subject, body, etc... and then create all the
emails through code for this to work.

Primarily, I want the email to look like they sent it from their inbox
with their signature etc... in it.

I didn't see anything in the object model that let me do it but I am
not sure which properties and methods I should be looking for.

If anyone has an answer on this, please advise.
 
A

Arvin Meyer [MVP]

I didn't see anything in the object model that let me do it but I am
not sure which properties and methods I should be looking for.
------------------------------------
Actually, it may be in the Word Object Model. If I'm not mistaken, Outlook
uses Word as an editor of RTF and HTML email. In any case, if it can be done
in Outlook or Word, it can most likely be automated from Access. Your
problem is to get the Outlook or Word method. I suggest that you ask in one
of those newsgroups (Outlook first) for a code sample, then we can probably
get something working from Access.

Try: microsoft.public.outlook
 

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