Solved

VB create outlook mail WITH default signature

Posted on 2004-08-17
4
1,594 Views
Last Modified: 2012-06-27
Hi,

I am using a straightforward vbscript to create and display an e-mail with To, Subject, Attachment etc fields already completed. This works absolutely fine. The only problem I have is that I would like to also include the person who created the e-mail's default outlook signature if they have one. I have no idea how to do this and I have not been able to find a solution anywhere on the net.

The existing code I am using is below, I am using outlook 2000 and 2003 and this works on both.

Dim objAppOutLook
Dim objOutlookMsg
Dim objOutlookNameSpace

Set objAppOutLook = CreateObject("Outlook.Application")
Set objOutlookNameSpace = objAppOutLook.GetNamespace("MAPI")
objAppOutLook.Session.Logon
Set objOutlookMsg = objAppOutLook.CreateItem(0)
 
objOutlookMsg.To = "test@test.com"
objOutlookMsg.cc = "test@test.com"
objOutlookMsg.Subject = "Hello"
objOutlookMsg.Body = "Does it work?"
'objOutlookMsg.Attachments.Add attachment, 1, , attachment
objOutlookMsg.Importance = 2
objOutlookMsg.Display

objAppOutLook.Session.Logoff
set objAppOutLook = Nothing
set objOutlookNameSpace = Nothing
set objOutlookMsg = Nothing

cheers

Richard
0
Comment
Question by:richierichie
4 Comments
 
LVL 3

Accepted Solution

by:
realrael earned 250 total points
ID: 11827261

there might not be a way to do it because the outlook object did not expose that function. you could work around it though. - rael

http://www.outlookcode.com/codedetail.aspx?id=162
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now