Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB create outlook mail WITH default signature

Posted on 2004-08-17
4
1,607 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

790 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