Default Signature added by macro

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.
 
M

Michael Bauer [MVP - Outlook]

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:
 

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