Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

VBA to remove modules in .DOT

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Needmo Smarts - 09 Apr 2005 06:23 GMT
Hello!
Is there a good strategy using VBA to remove (essentially) all VBA code?

I have some code in a template --in the Document_New() of the
ThisDocument-- and I have some supporting code in module "myCode"

Once this has run in the .DOC created from the template, none of it ever
needs to be run again when the .DOC is reopened so I am thinking if there
is a way under VBA control to delete it, why not do that?

Thanks for any strategy help -or- any specific ideas on how to do.
Warren
Perry - 09 Apr 2005 08:53 GMT
Store all the VBA automation actions to (active)documents in an addin.

More information, look here:
http://word.mvps.org/faqs/Customization/WhatTemplatesStore.htm

The distinct difference between VBA keywords ThisDocument versus
AciveDocument versus Documents(1) or Documents(5)

> Hello!
> Is there a good strategy using VBA to remove (essentially) all VBA code?
[quoted text clipped - 8 lines]
> Thanks for any strategy help -or- any specific ideas on how to do.
> Warren
Perry - 09 Apr 2005 08:57 GMT
I wasn't ready when the post up and went :-(
Let me finish here ...

resuming here:
Store all the VBA automation actions to (active)documents in an addin.

More information, look here:
http://word.mvps.org/faqs/Customization/WhatTemplatesStore.htm
The distinct difference between VBA keywords "ThisDocument" versus
"ActiveDocument" versus "Documents(1)" or "Documents(5)" will proove to be
significant.
Once the concept and the functionality of above keywords are part of yr VBA
vocabulary, realising
above suggestion is feasible and will proove to be valuable.

Krgrds,
Perry

"Perry" <DrumProgrammer@hotmail.com> wrote in message news:...
> Store all the VBA automation actions to (active)documents in an addin.
>
[quoted text clipped - 12 lines]
> > Once this has run in the .DOC created from the template, none of it ever
> > needs to be run again when the .DOC is reopened so I am thinking if
there
> > is a way under VBA control to delete it, why not do that?
> >
> > Thanks for any strategy help -or- any specific ideas on how to do.
> > Warren
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.