Something that's been puzzling me for a while:
It seems to me that
(1) in Word I can add in a template (Tools, AddIns, browse) and then open it (File, Open, browse followed by Tools, Macro, Visual basic editor) and inspect the code as I execute the template's macros.
but
(2) If I open the template and the VBE and THEN institute the template as an add-in, VBE tells me I can no longer inspect the code.
I'm guessing that this is a design aberration, because regardless of the sequence I follow (AddIn-Open or Open-AddIn), I should end up with the same effect, which is to be testing the macros with options to inspect and modify them as I go.
Opening AddIns (Word 2003)
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Opening AddIns (Word 2003)
He who plants a seed, plants life.
-
- Administrator
- Posts: 78568
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Opening AddIns (Word 2003)
It's a bit strange, but I guess it works as follows:
In Word, loading a template as an add-in disables viewing/editing the code in the template. Don't ask me why. So when you start Word, source code in add-ins is not accessible.
Now, if you open a template after it has been loaded as an add-in, you override the disabling and the source code becomes accessible again. But if you open a template then load it as an add-in, access to the source code is disabled, as mentioned above.
So it is *not* symmetric.
In Word, loading a template as an add-in disables viewing/editing the code in the template. Don't ask me why. So when you start Word, source code in add-ins is not accessible.
Now, if you open a template after it has been loaded as an add-in, you override the disabling and the source code becomes accessible again. But if you open a template then load it as an add-in, access to the source code is disabled, as mentioned above.
So it is *not* symmetric.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: Opening AddIns (Word 2003)
Interesting! I am running 2003 with two templates in my ..\Word\Startup folder.ChrisGreaves wrote:Something that's been puzzling me for a while:
It seems to me that
(1) in Word I can add in a template (Tools, AddIns, browse) and then open it (File, Open, browse followed by Tools, Macro, Visual basic editor) and inspect the code as I execute the template's macros.
but
(2) If I open the template and the VBE and THEN institute the template as an add-in, VBE tells me I can no longer inspect the code.
I'm guessing that this is a design aberration, because regardless of the sequence I follow (AddIn-Open or Open-AddIn), I should end up with the same effect, which is to be testing the macros with options to inspect and modify them as I go.
- On launching Word both templates are loaded as add-ins and the code is unviewable from either template.
- Whether or not I unload either add-in; I can open the template and then view the code.
Regards
Don
Don
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Opening AddIns (Word 2003)
Thanks Hans, and I agree with your analysis.HansV wrote:It's a bit strange,
It seems to me to be a weird design approach, and when I say "weird" I'm being polite, it being Friday an' all ...
He who plants a seed, plants life.
-
- Administrator
- Posts: 78568
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Opening AddIns (Word 2003)
There is probably a design decision from 1985 or so behind this which is now so deeply embedded that it'd be very difficult to change it. (Microsoft once tried to rewrite Word from scratch in the '90s and gave up...)
Best wishes,
Hans
Hans