Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Todd Todd is offline
external usenet poster
 
Posts: 41
Default Macro works once then gets disabled

I have a template with a custom toolbar that runs a macro when pressed. The
macro works fine one time and then when you press it again it says the macro
has can not be found or has been disabled. Any help on why it won't work
more than once?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Macro works once then gets disabled

What does the macro do? Does it perhaps close the document or template that
contains the macro?

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Todd wrote:
I have a template with a custom toolbar that runs a macro when
pressed. The macro works fine one time and then when you press it
again it says the macro has can not be found or has been disabled.
Any help on why it won't work more than once?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Todd Todd is offline
external usenet poster
 
Posts: 41
Default Macro works once then gets disabled

It emails the document. It does close the form after it is emailed.

"Jay Freedman" wrote:

What does the macro do? Does it perhaps close the document or template that
contains the macro?

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Todd wrote:
I have a template with a custom toolbar that runs a macro when
pressed. The macro works fine one time and then when you press it
again it says the macro has can not be found or has been disabled.
Any help on why it won't work more than once?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Macro works once then gets disabled

You'll need to know exactly where the macro is saved, but I suspect this is
what's happening:

The document is based on a specific template, and the macro is stored in
that template. When you create or open a document based on that template,
the template is also loaded in the background (you should see it in the
Tools Templates & Add-Ins dialog with a check next to its name). That
makes the macro available.

When the macro closes the document, that action also unloads the template
(unless there's still another document open that's based on the same
template). That causes the macro to be removed from memory, which is why the
button can't run it again.

You should probably move the macro to a global template (one stored in
Word's Startup folder) so it's always available. See
http://www.word.mvps.org/FAQs/Custom...latesStore.htm for more
details.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Todd wrote:
It emails the document. It does close the form after it is emailed.

"Jay Freedman" wrote:

What does the macro do? Does it perhaps close the document or
template that contains the macro?

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

Todd wrote:
I have a template with a custom toolbar that runs a macro when
pressed. The macro works fine one time and then when you press it
again it says the macro has can not be found or has been disabled.
Any help on why it won't work more than once?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a Macro Driven Word Document on MS Works JohnnyRed Microsoft Word Help 2 September 19th 06 05:05 AM
inserting an endnote gives: The Macro in this project are disabled Khoshravan Microsoft Word Help 9 August 8th 06 01:50 PM
macro button Jack B Microsoft Word Help 5 July 26th 06 04:22 PM
Macro execution using MailMerge nelsonj Mailmerge 9 June 13th 06 05:04 PM
"Macro Language Disabled" in Word 2003 tried reinstalling-no luc. Bobcat Microsoft Word Help 2 February 5th 05 09:29 PM


All times are GMT +1. The time now is 12:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"