VBA Code in Outlook disappears after first use

acuLee

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
#1
Hi,
I have a simple VBA code in Outlook 2016 that pops up when users send an email that does not contain our domain name.
This works fine on a local machine using a local profile but when I transfer the code to accounts in a Citrix environment the code works only once and then disappears and does not work.
I can copy the code into the Visual Basic area of Outlook and click save, theVbaProject.OTM file updates in the %AppData%\Roaming\Microsoft\Outlook directory
But if i close down outlook and open again the code is not there but the v.OTM file is still there.
If i log out and log back on again the code appears again, I can use this one time and then again the code disappears.
Any ideas?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#2
I'm assuming, since the macro works once, that this a typo %AppData%\Roaming\Microsoft\Outlook.
That path goes to C:\Users\%username%\AppData\Roaming\Roaming\Microsoft\Outlook - use %AppData%\Microsoft\Outlook

But if i close down outlook and open again the code is not there but the v.OTM file is still there.
Sounds like its not saving the changes or is not syncing the changes back to the roaming directory.

I don't know if using a different VBA project would help - see Start Outlook using a different VBA Project file
 

Similar threads

Top