Default Signature added by macro

  • Thread starter Thread starter DStrong
  • Start date Start date
D

DStrong

OK, the scoop on my systems I am using, all machines are running XP Pro with
Office 2003 and exchange server(not sure of what version).

What I am doing is making a standard email that is sent by multiple people
asking for status updates and various other things. I am creating the body of
the email in my code and this overwrites the users signature. Since we have
multiple users it is impractical to insert their signature in my code. I
might as well write the emails for everyone. So what I would like is for the
code to insert the default signature at the end of the body. Here is my code
so far:

Sub LEG_Rcving()
Dim dcn, vname, invpo
Dim objMail As Outlook.MailItem
dcn = InputBox("Enter DCN")
vname = InputBox("Enter the Vendor's Name")
invpo = InputBox("Enter the Invoice/PO #")
'ask user for data
'dcn = InputBox("Enter DCN")
'Create e-mail item
Set objMail = Application.CreateItem(olMailItem)
With objMail
'Set body format to HTML
.ReplyRecipients.Add "(e-mail address removed)"
.BodyFormat = olFormatHTML
.Subject = "DCN# " & dcn & " " & vname & " #" & invpo & ""
.HTMLBody = _
"<HTML><BODY><font face='arial'>Please advise on the receiving status of
this invoice.<br><br><br></font></BODY></HTML>"
.Display
End With

End Sub

I am pretty sure that this can be done, but I just cannot figure it out to
save me.
Thanks in advance for any advice.
 
After creating the e-mail, call its GetInspector method, which will insert
the signature. Then place your text at the beginning of the body like this:

sig=htmlbody
htmlbody = yourtext & sig

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool
: <http://www.vboffice.net/product.html?pub=6&lang=en>



Am Thu, 16 Oct 2008 06:59:01 -0700 schrieb DStrong:
 
Back
Top