Solved

VB create outlook mail WITH default signature

Posted on 2004-08-17
4
1,611 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

679 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