Create a new Outlook MailItem with user's default signature

May 17th, 2005 - 02:09 pm ET by yinjennytam | Report spam
From the current Outlook Object model, I can't seem to find a way of knowing
whether the user has a default signature setup.

In addition, when creating a new MailItem, even though I have a default
signature setup, the new mail does not have it added automatically. Our
add-in needs to support Outlook 2000, 2002 and 2003, and I used the OOM from
Outlook 2000.

Is there any way around it or am I missing something? Thank you very much!
email Follow the discussionReplies 9 repliesReplies Make a reply

Replies

#1 v-phuang
May 24th, 2005 - 03:17 am ET | Report spam
Hi

Actually, the first problem is that that the OM doesn't handle autosigs
very well. That functionality is in Outlook's UI-type code, therefore you
theoretically need to display the item first so the autosig gets added.
However, you can also use GetInspector to force the autosig to be added:

Sub Test23232323()
Dim mi As Outlook.MailItem
Set mi = Application.CreateItem(olMailItem)
mi.To = "address"
mi.Subject = "hello"
Set oInsp = mi.GetInspector
mi.Send
End Sub

The second issue is just a limtation of the Body property.

Description of the Message or Notes field in Outlook 2002 (291153)
http://support.microsoft.com/defaul...-US;291153

Using HTML-formatted mail and the HTMLBody property would be preferred
approach, but of course this typically isn't realistic for an org-wide
solution where messages are in various formats (also with and without Word
as the editor)

If you still have any concern, I suggest you contact MSPSS direct to see if
they have any other idea.
http://support.microsoft.com

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Similar topics