WallIT
01-13-2015, 11:31 AM
Hi,
I want to check any document that gets opened for a specific document property value (the value in the Company field). I need this to happen when any/all documents are opened, either from File > Open, or double-clicking or email attachments, etc. I am using a global template which is specified in the Word Startup folder.
The code I am using was lifted from this example, just to see if it works http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Word/Q_27305417.html I will modify the code to check for the document property once I have this simple code working.
I think my problem is where to put the code so it fires for all documents that get opened. I have attempted to put the above command in various places, such as 'ThisDocument' and Class Modules\ThisApplication but it is not working when the global is loaded and I attempt to open other documents.
Putting the code in 'ThisDocument' does work if I then open the same document, so I know the code is good, but my placement is off.
Help/advice appreciated
Thanks.
I want to check any document that gets opened for a specific document property value (the value in the Company field). I need this to happen when any/all documents are opened, either from File > Open, or double-clicking or email attachments, etc. I am using a global template which is specified in the Word Startup folder.
The code I am using was lifted from this example, just to see if it works http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Word/Q_27305417.html I will modify the code to check for the document property once I have this simple code working.
I think my problem is where to put the code so it fires for all documents that get opened. I have attempted to put the above command in various places, such as 'ThisDocument' and Class Modules\ThisApplication but it is not working when the global is loaded and I attempt to open other documents.
Putting the code in 'ThisDocument' does work if I then open the same document, so I know the code is good, but my placement is off.
Help/advice appreciated
Thanks.