Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using stationary with the DoCmd.SendObject action

Posted on 2004-04-02
10
Medium Priority
?
496 Views
Last Modified: 2012-05-04
Have automated sending an e-mail using the DoCmd.SendObject method, however I need the resulting e-mail to use Stationary and a signature, but cant get this on the mail. Any help would be very much appreciated!
0
Comment
Question by:employment-law
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 10739702
dont know if that is possible, have you considered outlook automation?

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10739720
there is some sample code here, wonder if you can expand on this to add your stationary/signature

http://www.experts-exchange.com/Databases/MS_Access/Q_20916531.html
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:employment-law
ID: 10740095
Hmm, not sure how to include any kind of formatting in the example, have defaulted Outlook Express to use the stationary and Signature, but when passing the info from my form the email created is standard with no formatting.
0
 

Author Comment

by:employment-law
ID: 10824098
The second link seems to be discussing my problem exactly, but I can make no sense of it! Is it just me? The command I am using is:

    DoCmd.SendObject acSendNoObject, , acFormatHTML, "" & [EMail], , , "ELAS Reply", "" & [Notes], False, "C:\Documents and Settings\andy\Local Settings\Temporary Internet Files\Content.IE5\NSUGBRVL\Stationary.html"

All references to this command I can find do not use the last argument  (templatefile). Im tearing my hair out! please save me from going bald!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 11029673
Howdo, regarding this

Ive tried all sorts, even using existing stationary (e.g.  "C:\Program Files\Microsoft Office\Stationery\1033\Jungle.htm")
and still no luck, what I found was, the email is always set to Plain Text , even though acFormatHTML was specified

change your False to True to leave the new mail msg window open, and see for yourself

 DoCmd.SendObject acSendNoObject, , acFormatHTML, "" & [EMail], , , "ELAS Reply", "" & [Notes], True, "C:\Documents and Settings\andy\Local Settings\Temporary Internet Files\Content.IE5\NSUGBRVL\Stationary.html"


I had a look at Outlook Automation, but the only way I could see of adding stationary in there was to create the html syntax string and set the property HTMLBody





0
 
LVL 65

Expert Comment

by:rockiroads
ID: 11567014
any luck with this?
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 11954906
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

Accept - rockiroads

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

RoutineT
EE Cleanup Volunteer

0
 

Author Comment

by:employment-law
ID: 11961358
Sorry guys, kept meaning to reply n then getting distracted! Could not get stationary working in Outlook Express, however the following works with Outlook:


    ' Create the Outlook session.
    Set objOutlook = CreateObject("Outlook.Application")
   
    ' Create the message.

    Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
   
    With objOutlookMsg
         ' Add the To recipient(s) to the message.
         Set objOutlookRecip = .Recipients.Add("" & [EMail])
         objOutlookRecip.Type = olTo
       
        ' Set the Subject, Body, and Importance of the message.
        'sets an HTML background to the message (STATIONERY)
                   
        .HTMLBody = "<html><head></head><body background=" & Chr(34) & "C:\Program Files\Common Files\Microsoft Shared\Stationery\Stationary.gif" & Chr(34) _
            & " bgcolor=" & Chr(34) & "#C9B49A" & Chr(34) & ">" & [Notes] & "</body></html>"
        .Subject = "Elas Response"
        .Display
        ' Resolve each Recipient's name.
        For Each objOutlookRecip In .Recipients
            objOutlookRecip.Resolve
        Next
     
    End With
    Set objOutlook = Nothing

I attached the code to a button after the user enters the notes, tey populate the subjects of an e-mail, which can then be sent. Still requires user intervention to click the Send button, and if Outlook not open when it is run does some odd things, but works to a fashion....

Thanx for the help

Andy
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 11985520
PAQed, with points refunded (130)

Computer101
E-E Admin
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question