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 / August 2005

Tip: Looking for answers? Try searching our database.

VBA, Quite a challenge for me...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Franko - 10 Aug 2005 16:20 GMT
I hope someone can help me with this:

I’ve created a macro within a Ms-Word Document, after I use the macro, I
need to save a copy of this document using a different name (as you can see,
I’m using the original document as a template).

Problem is, that when I open the template based document, the macro is there
too (obviously).
What I need is a way to save a copy of a document, but not the macros that
the document might have.

I was thinking about a second macro that stops the first macro when it
“sees” that the document’s name has changed, but I’m not really sure if this
could be possible.

I’d really appreciate it if anyone could help me with this so-called
“challenge”. Thank you
Jay Freedman - 10 Aug 2005 17:29 GMT
Hi Franko,

The source of the trouble is here:

> (as you can see, I'm using the original document as a template).

Don't use a document "as a template", make it a real template. Starting with
your original document, go into File > Save As, set the "Save as type" box
to "Word Template (*.dot)", supply a name, and click Save. When you change
the "Save as type", Word will automatically switch to your Templates folder
and supply the .dot extension.

Now use File > New to create new documents based on that template. When you
save these documents, the macros will stay in the template and won't be
saved in the document. Then you won't have to chase your tail to try to
avoid the current situation.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> I hope someone can help me with this:
>
[quoted text clipped - 13 lines]
> I'd really appreciate it if anyone could help me with this so-called
> "challenge". Thank you
 
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.