Link to home
Create AccountLog in
Avatar of ddantes
ddantesFlag for United States of America

asked on

Automating an Outlook button

Running Outlook 2007 on a Windows 7 32-bit platform, I have a button on the toolbar which activates a VB script to add a suffix to recipients Email address.  The button's default condition is OFF, until it is pressed. and it resets to OFF when Outlook is first launched.  I wonder if there is a way to set the default condition to ON?
Here is the code.  Please be aware that I am not the author of this code and I'll need specific instructions if it is to be amended...

Sub ToggleAddSuffix()
    bolAddSuffix = Not bolAddSuffix
    MsgBox "AddSuffix is now " & IIf(bolAddSuffix, "ON", "OFF"), vbInformation + vbOKOnly, "Toggle Add Suffix"
End Sub

Open in new window

Avatar of Qlemo
Flag of Germany image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of ddantes


Worked perfectly!