I am seeing a ghost in the list of macros in Word 2002 
Author Message
 I am seeing a ghost in the list of macros in Word 2002

I've been programming the VBIDE to modify the modules in a  template and
create a brand new template containing the modified modules.

In general, I:

1. Modify the code in the original template using a temporary module, let's
call this, "ship".
2. Use OrganizerCopy to copy to the new template.
3. Use OrganizerRename to rename the module in the new template.
4. Use OrganizerDelete to remove "ship" from the original template.

After the deed is done, if I close the VBIDE and look at Tools | Macros in
Word, I see that a macro in the last copy of "ship" is listed  in the macro
list even tho the "ship" module no longer exists. I verified that the module
no longer exists by running a macro that lists the project components. If I
try to access the macro with the Edit button in Tools | Macros, I get a
message box that tells me there's no such critter.

If I exit from Word and restart Word, the ghost macro is no longer listed.
I was able to reproduce this by starting over with a clean template file.

I did not notice the problem until a few hours ago.

Anybody know how to get around this?

--
http://www.*-*-*.com/ ; Programming and support for  Word macros,
including converting from WordBasic to VBA; Technical reviewing; Standards;
Product functional/design/specifications
------------------------------------------------



Thu, 23 Dec 2004 14:44:44 GMT  
 I am seeing a ghost in the list of macros in Word 2002
How about utilizing the Reset method of the commandbar
control that brings up the Macro dialog?

Kind regards,
Perry



Quote:
> I've been programming the VBIDE to modify the modules in a  template and
> create a brand new template containing the modified modules.

> In general, I:

> 1. Modify the code in the original template using a temporary module,
let's
> call this, "ship".
> 2. Use OrganizerCopy to copy to the new template.
> 3. Use OrganizerRename to rename the module in the new template.
> 4. Use OrganizerDelete to remove "ship" from the original template.

> After the deed is done, if I close the VBIDE and look at Tools | Macros in
> Word, I see that a macro in the last copy of "ship" is listed  in the
macro
> list even tho the "ship" module no longer exists. I verified that the
module
> no longer exists by running a macro that lists the project components. If
I
> try to access the macro with the Edit button in Tools | Macros, I get a
> message box that tells me there's no such critter.

> If I exit from Word and restart Word, the ghost macro is no longer listed.
> I was able to reproduce this by starting over with a clean template file.

> I did not notice the problem until a few hours ago.

> Anybody know how to get around this?

> --
> http://www.standards.com/; Programming and support for  Word macros,
> including converting from WordBasic to VBA; Technical reviewing;
Standards;
> Product functional/design/specifications
> ------------------------------------------------



Thu, 23 Dec 2004 18:36:01 GMT  
 I am seeing a ghost in the list of macros in Word 2002
That would wipe out other customizations.

In any case, I found a simple workaround that executes much more quickly,
it's better code too.

Instead of creating a temporary module, modifying the code, and using
Organizer as I indicated, I found that the problem is avoided and the code
runs much faster if I instead do the following:

1. Export each module from the Source template.
2. Import each module into the new template.
3. Make the modifications in the new template.

This avoids the apparent bug using Organizer since a temporary module is
never created in the Source template.
And it seems to execute more than 20% faster. In a few minutes, I'll try a
test that took about 42 minutes with the old code to see how much quicker it
runs.

--
http://www.standards.com/; Programming and support for  Word macros,
including converting from WordBasic to VBA; Technical reviewing; Standards;
Product functional/design/specifications
------------------------------------------------

Quote:
> How about utilizing the Reset method of the commandbar
> control that brings up the Macro dialog?

> Kind regards,
> Perry



> > I've been programming the VBIDE to modify the modules in a  template and
> > create a brand new template containing the modified modules.

> > In general, I:

> > 1. Modify the code in the original template using a temporary module,
> let's
> > call this, "ship".
> > 2. Use OrganizerCopy to copy to the new template.
> > 3. Use OrganizerRename to rename the module in the new template.
> > 4. Use OrganizerDelete to remove "ship" from the original template.

> > After the deed is done, if I close the VBIDE and look at Tools | Macros
in
> > Word, I see that a macro in the last copy of "ship" is listed  in the
> macro
> > list even tho the "ship" module no longer exists. I verified that the
> module
> > no longer exists by running a macro that lists the project components.
If
> I
> > try to access the macro with the Edit button in Tools | Macros, I get a
> > message box that tells me there's no such critter.

> > If I exit from Word and restart Word, the ghost macro is no longer
listed.
> > I was able to reproduce this by starting over with a clean template
file.

> > I did not notice the problem until a few hours ago.

> > Anybody know how to get around this?

> > --
> > http://www.standards.com/; Programming and support for  Word macros,
> > including converting from WordBasic to VBA; Technical reviewing;
> Standards;
> > Product functional/design/specifications
> > ------------------------------------------------



Fri, 24 Dec 2004 01:23:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Going from Word 97 to Word 2002 (Macros)

2. Word 2002: How to save a file in Word 97 format in Word 2002

3. Macros in Word 2002

4. How do I create macros in word 2002?

5. Macro for sending an email in Word 2002

6. Online tutorial or book for Word 2002 macros?

7. Word 2002 - view/edit macros

8. macro created in Word 2002 does not record font change

9. Custom Button linked to Macro for Word 2002

10. Disappearing macros in Word 2002

11. Word 2002 macro recorder doesn't record Font characteristics during Search/Replace

12. Word Macro Selection.range.insertdatabase Office XP/2002

 

 
Powered by phpBB® Forum Software