Thread: [Solved] Global variables
View Single Post
 
Old 05-01-2019, 08:00 AM
inlanoche inlanoche is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default Global variables

I am still working on a QC Control VBA add in to word to better manage the QC process to our company standards.

I've got it to about 90% complete, but I'm finding that to dummy proof the scripts, I may need to use some global variables. as testing I added a global var to my module, but it seems that as I run each script in my module (one to set your role, another to create the custom styled comment based on your role) it appears that my global var resets to "".

I looked into a few things and found write up on Document variables. the ActiveDocument.Variables looks promising, but I need a variable that clears when the document is closed. So basically, it has to reset on opening the document. Is there something in Word VBA that can act like that?
Reply With Quote