Solved

Display the default signature in a new Outlook mail message

Posted on 2010-09-22
10
494 Views
Last Modified: 2012-05-10
I have a VB6 program that generates an Outlook email, the problem is it does not contain the user's signature? Any ideas how to ensure that it is part of the email

0
Comment
Question by:rocky050371
  • 5
  • 4
10 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 33733057
The GetInspector is what adds the default signature

http://www.dreamincode.net/forums/topic/31537-use-of-default-signature-from-outlook-olmail/
Dim oOutlook As Outlook.Application  

02 Dim olMail As Outlook.MailItem  

03 Dim oAddSig As Outlook.Inspector  

04    

05 Set oOutlook = CreateObject("Outlook.Application")  

06 Set olMail = olApp.CreateItem(olMailItem)  

07    

08 Set oOutlook = olMail.GetInspector  

09    

10 With olMail  

11       Call .Recipients.Add("h***@there.com")  

12       .Subject = "Blah blah blah" 

13       .Body = "Email test message 1" 

14       Call .Send  

15 End With  

16 Set oOutlook = Nothing 

Open in new window

0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 33733127
I haven't heard of the getinspector returning the signature so just in case the normal method with which I am familiar is getboiler!

As demonstrated by Ron DeBruin:

http://www.rondebruin.nl/mail/folder3/signature.htm

Chris
0
 

Author Comment

by:rocky050371
ID: 33733301
The GetInspector method does not add the signature
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 33733391
It will certainly work by importing it after the fashion of the supplied link then.

Chris
0
 

Author Comment

by:rocky050371
ID: 33733485
I implemented Ron's code, the problem I have is that the images are missing,
0
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

 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 33733545
I honestly cannot recall if I ever tried it with graphics so are you using the HTML file import ... and is the email HTML, for example?

Chris
0
 

Author Comment

by:rocky050371
ID: 33733608
Yes I set the objMail.HTMLBody but it leaves out the images
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 33733669
I need to try and play with this ... so I may be a while - and perhaps someone knowing more will be able answer soon.

Chris
0
 

Author Comment

by:rocky050371
ID: 33767654
Hi Chris,

I managed to open the signature replace the image path with the full path and it worked fine. Thanks for you help
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 33767676
Ah

I would never have seen that as your problem as I was using a direct path already ... well done.

Chris
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA: retain first and second level based on "." 6 69
Validating VB6 Function 19 49
VBA filters 2 37
Add a task in Outlook from access 11 32
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

708 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

15 Experts available now in Live!

Get 1:1 Help Now