Avatar of ddantes
ddantes
Flag 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

VB ScriptOutlookWindows OSWindows 7

Avatar of undefined
Last Comment
ddantes

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Qlemo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ddantes

ASKER
Worked perfectly!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23