how to find outlook user settings programmatically

S

Shiv Kotagal

Hi ,
I have a COM Add-In in which I am trapping the 'Reply'
and 'Reply All' events to create custom replies. My
problem is I need to insert a signature in the reply
mailitem if the user has the set it up in the tools-
options->mail format settings. How do I programmatically
find whether a user has signature settings and insert the
signature in my custom Reply Email ?

Help please, any clue on this will be greatly
appreciated !!!

Regards,
Shiv
 
S

Sue Mosher [MVP]

The signature information is in the Windows registry, although I don't have the exact location at the tip of my fingers. One way to get the user's default signature is to create a new message. Sample code at http://www.outlookcode.com/codedetail.aspx?id=162 . Otherwise, you have to poke around for the actual signature files.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Shiv Kotagal

Thanks Sue, for replying so promptly. I understand your
solution of how to create the signature in a new email,
but yet I still need to find out whether or not, the user
has opted in the user settings to have a signature
automatically inserted in his new emails or reply emails.
I tried to look at the registry but couldnt find the
signature settings. Do you have any suggestions about how
to do this ?

Thanks a million,
Shiv
-----Original Message-----
The signature information is in the Windows registry,
although I don't have the exact location at the tip of my
fingers. One way to get the user's default signature is to
create a new message. Sample code at
http://www.outlookcode.com/codedetail.aspx?id=162 .
Otherwise, you have to poke around for the actual
signature files.
 
S

Sue Mosher [MVP]

What I would do is set up a user that *does* have signatures set and look in the registry for related settings. Depending on the Outlook version, you may need to look both in Outlook and Word keys.

As a general technique, there are also registry comparison tools available that will take before and after snapshots of the registry for you to compare.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Marc

This is the location of the 2 signature settings. These keys will only exist
if a signature is selected for either of them.

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\MailSettings\NewSign
ature
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\MailSettings\ReplySi
gnature

The 10.0 is the location for Outlook 2002.

Does anyone know the best way to figure out what version of Outlook is
installed to know what version number to use where the 10.0 is? I found some
example code that creates a new email and gets the version number from it.
The problem is it has to save the email to get the version then deletes the
email ... each of these blank deleted email end up accumulating in the
Deleted items folder.

I would like a way outside of Outlook through VB6.0 to get the installed
version of Outlook. Is this possible?

Any help on this would be greatly appreciated.

Thanks,
Marc

---------------

What I would do is set up a user that *does* have signatures set and look in
the registry for related settings. Depending on the Outlook version, you may
need to look both in Outlook and Word keys.

As a general technique, there are also registry comparison tools available
that will take before and after snapshots of the registry for you to
compare.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

I just use the Application.Version property and trap the error you get if it's Outlook 97.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

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