K
Kristy
Hi Sue
I am using Exchange 2000, Windows XP, and have written a Com add-in
for Outlook 2000/2002(VB6).
I was looking at your sample code to "Launch custom form message with
default signature" and was wondering if you could help me.
I do something similar but the problem is that I have to "display" the
message for it to work, which causes more "activity" on the screen
than I'd like (especially if it doesn't have to be that way). In your
example you don't display objSigMail to get hold of the signature. I
have run your sample (as is) also and had the same results so I am
hoping that it is just my pc and a rebuild or something will fix the
problem... or is the signature only created in the body of the message
when it is displayed (not when it's created), hense I'm stuck with
display or one of the many other options I've tried to get the default
signature into my message?
Example with the additional line of code I need to it to work...
Sub StartNewCustomMsgWithSig(strMessageClass As String)
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colDrafts As Outlook.Items
Dim objMail As Outlook.MailItem
Dim objSigMail As Outlook.MailItem
Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set colDrafts = objNS.GetDefaultFolder(olFolderDrafts).Items
Set objMail = colDrafts.Add(strMessageClass)
Set objSigMail = objOL.CreateItem(olMailItem)
'added line required to get the HTML signature
objSigMail.Display
objMail.HTMLBody = objSigMail.HTMLBody
objSigMail.Close olDiscard
objMail.Display
Set objOL = Nothing
Set objNS = Nothing
Set colDrafts = Nothing
Set objMail = Nothing
Set objSigMail = Nothing
End Sub
Thanks also for all of your other samples/tips/tricks/tutorials that
I've made use of so far.
I am using Exchange 2000, Windows XP, and have written a Com add-in
for Outlook 2000/2002(VB6).
I was looking at your sample code to "Launch custom form message with
default signature" and was wondering if you could help me.
I do something similar but the problem is that I have to "display" the
message for it to work, which causes more "activity" on the screen
than I'd like (especially if it doesn't have to be that way). In your
example you don't display objSigMail to get hold of the signature. I
have run your sample (as is) also and had the same results so I am
hoping that it is just my pc and a rebuild or something will fix the
problem... or is the signature only created in the body of the message
when it is displayed (not when it's created), hense I'm stuck with
display or one of the many other options I've tried to get the default
signature into my message?
Example with the additional line of code I need to it to work...
Sub StartNewCustomMsgWithSig(strMessageClass As String)
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colDrafts As Outlook.Items
Dim objMail As Outlook.MailItem
Dim objSigMail As Outlook.MailItem
Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set colDrafts = objNS.GetDefaultFolder(olFolderDrafts).Items
Set objMail = colDrafts.Add(strMessageClass)
Set objSigMail = objOL.CreateItem(olMailItem)
'added line required to get the HTML signature
objSigMail.Display
objMail.HTMLBody = objSigMail.HTMLBody
objSigMail.Close olDiscard
objMail.Display
Set objOL = Nothing
Set objNS = Nothing
Set colDrafts = Nothing
Set objMail = Nothing
Set objSigMail = Nothing
End Sub
Thanks also for all of your other samples/tips/tricks/tutorials that
I've made use of so far.