Add Signature using Code

S

Sanjay Singh

I would like to add a signature to Outlook using code. I know where the
signature files are stored and can create the files in the three required
formats.

How do I then add the signature to the Signatures drop-down in Outlook?
I don't actually need to set the default signature but I need the new
signature to appear in the list of signatures.

I believe that this has something to do with registry entries.

It will be great if the solution can support:
Outlook 2000 (Without Word as Editor only- don't need to support Word as
editor)
Outlook 2002 (With and Without Word as Editor)
Outlook 2003 (With and Without Word as Editor)

Please Help!

Thanks
Sanjay
 
M

Michael Bednarek

I would like to add a signature to Outlook using code. I know where the
signature files are stored and can create the files in the three required
formats.

How do I then add the signature to the Signatures drop-down in Outlook?
I don't actually need to set the default signature but I need the new
signature to appear in the list of signatures.

I believe that this has something to do with registry entries.

It will be great if the solution can support:
Outlook 2000 (Without Word as Editor only- don't need to support Word as
editor)
Outlook 2002 (With and Without Word as Editor)
Outlook 2003 (With and Without Word as Editor)

This is what I do: Just copy them into the directory for signatures.
Here, that is "%USERPROFILE%\Application Data\Microsoft\Signatures".

They may not show up directly in the drop-down list immediately, but
they will once the user has gone through More...

Bula!
 
S

Sanjay Singh

Bula Michael

Thanks for your help. I tested your solution and it "almost" works.

Copying the files to the Signatures folder is no problem.

The problem is making sure that the new items show up in the list inside
Outlook. In this particular application, I need to be 100% sure that the new
items are on the list of signatures in Outlook.

Is there anycode to either regenerate the list or to add the item to the
list manually?

Thanks
Sanjay
 
M

Michael Bednarek

Thanks for your help. I tested your solution and it "almost" works.

Copying the files to the Signatures folder is no problem.

The problem is making sure that the new items show up in the list inside
Outlook. In this particular application, I need to be 100% sure that the new
items are on the list of signatures in Outlook.

Is there anycode to either regenerate the list or to add the item to the
list manually?

None that I know.
 
M

Michael Bauer [MVP - Outlook]

Am Mon, 4 Sep 2006 10:23:53 +1200 schrieb Sanjay Singh:

You could add the entry to the list yourself. With OutlookSpy
(www.dimastr.com) it´s easy to explore the necessary IDs.

If Outlook (with Outlook as mail editor) also adds the item (maybe later)
then you will have it probably twice. I think for that case you should be
able to track the CommandBars.OnUpdate event and check if the same caption
is available twice. In that case delete one item.

In Word the dropdown for sigantures isn't exposed. I think there's no way.
 
S

Sanjay Singh

Hi Micahel

Thanks for your help.
Will explore further based on your suggestions.

Thanks again.
Sanjay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top