thebernieb
Programmer
Folks,
I have created an application that uses VBA macros in Excel and Word templates to perform actions when a document is opened. This works splendidly and I have no problems. However, I do have a problem when I want to update the AutoOpen code. It is a tricky situation, so I'll explain.
Let's say that I have a document created in microsoft word based upon the normal template. In the normal template I have an autoopen macro that executes a series of commands. Any document I create from the normal template will execute these commands upon opening. If change the autoopen code in the normal template and open a document that was created using old normal template it will still use the new code.
This is nature of microsoft word. It will always link(refer) back to the template for the most current code.
Microsoft Excel on the other hand does not do this. If I create 10 documents based upon a given template then decide I want to change the code in the template, I have to update the code in each of the 10 documents. Why does Excel not link back to original template when opening a file? Is there any way to update the code in a group of .xls files by updated the template they were created from? Or do I have to create a "virus" and "infect" them with the new code I want?
Thanks for any help.
Bernie
I have created an application that uses VBA macros in Excel and Word templates to perform actions when a document is opened. This works splendidly and I have no problems. However, I do have a problem when I want to update the AutoOpen code. It is a tricky situation, so I'll explain.
Let's say that I have a document created in microsoft word based upon the normal template. In the normal template I have an autoopen macro that executes a series of commands. Any document I create from the normal template will execute these commands upon opening. If change the autoopen code in the normal template and open a document that was created using old normal template it will still use the new code.
This is nature of microsoft word. It will always link(refer) back to the template for the most current code.
Microsoft Excel on the other hand does not do this. If I create 10 documents based upon a given template then decide I want to change the code in the template, I have to update the code in each of the 10 documents. Why does Excel not link back to original template when opening a file? Is there any way to update the code in a group of .xls files by updated the template they were created from? Or do I have to create a "virus" and "infect" them with the new code I want?
Thanks for any help.
Bernie