Outlook Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a macro that will change the AutoSignature to none and then either
open the Stationery picker or choose a specific stationery.
 
None of those functions are possible with the Outlook Object Model. This
also depends on which version of Outlook.

For 2003, signature data is stored on a per account basis. The name of the
signature itself is stored in these keys: New Signature and Reply-Forward
Signature. Both of those keys are stored in a sub-key of this hive:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\<profilename>\9375CFF0413111d3B88A00104B2A6676

Note that you will have to read the binary data of the Account Name value in
every sub key to find the account you want to modify the signature for.

For Outlook 2002 and earlier, the task is easier. You just have to read the
values from the following key:

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\MailSettings
(under the key names NewSignature and ReplySignature)

The list of the available keys can be determined by looking at the unique
file names before the extension in this folder:
C:\Documents and Settings\<username>\Application Data\Microsoft\Signatures.
You can use the FileSystemObject from the Microsoft Scripting Runtime library
to read files/folders. So you'd have to design a form that would create a
list from those signatures and allow the user to choose which one. Then
right the name of that signature to the appropriate place in the registry.
Google "Registry Class Visual Basic" for some free helper routines for
registry reading/writing.
 
Back
Top