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 / March 2007

Tip: Looking for answers? Try searching our database.

Delete smart tags automatically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Macro''''er - 10 Mar 2007 23:17 GMT
Hello,  Can someone please provide me a macro I can use for..

If there is a smart tags in the document, to automatically removed them
prior to closing or exiting.

I'd appreciate any help!  Thank you!
Signature

Smile...it is good for you!  :)

Jay Freedman - 11 Mar 2007 02:38 GMT
>Hello,  Can someone please provide me a macro I can use for..
>
>If there is a smart tags in the document, to automatically removed them
>prior to closing or exiting.
>
>I'd appreciate any help!  Thank you!

The following is copied directly from the Help topic for the
RemoveSmartTags method:

~~~~~

This example removes all smart tag information from the active
document.

Sub SmartTagRemove()
   ActiveDocument.RemoveSmartTags
End Sub

~~~~~

But for what you want, it's probably sufficient to go to Tools >
Options > Save and uncheck the box for "Embed smart tags". They won't
be saved in the file, although if you have smart tags enabled in your
Word program they'll be rebuilt when you reopen the document.

--
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.
Macro''''er - 11 Mar 2007 02:51 GMT
Thanks for your quick response.  How can I incorporate the codes you provided
with the AutoClose macro?  We worked with several documents and often times
the editor forgets to remove the smart tags prior to closing so I would like
to run a macro where when they close the document; the macro will
automatically remove smart tags.

Thanks again!

Sub SmartTagRemove()
ActiveDocument.RemoveSmartTags
End Sub

Signature

Smile...it is good for you!  :)

> >Hello,  Can someone please provide me a macro I can use for..
> >
[quoted text clipped - 28 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
Graham Mayor - 11 Mar 2007 07:43 GMT
Rename the macro sub AutoClose()
or add the line
ActiveDocument.RemoveSmartTags
to an existing autoclose macro?
http://www.gmayor.com/installing_macro.htm

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Thanks for your quick response.  How can I incorporate the codes you
> provided with the AutoClose macro?  We worked with several documents
[quoted text clipped - 40 lines]
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.
Macro''''er - 12 Mar 2007 19:18 GMT
Thanks Graham.

So new at this macro stuff so pardon my "stupid" question.  I added the code
below in my template module.  Would there be any issue adding this in the
module and not in the objects?  I'm not sure what the "Private Sub
Document_Close" as oppose to "Sub Document_Close".

Private Sub Document_Close()

ActiveDocument.RemoveSmartTags

End Sub
Signature

Smile...it is good for you!  :)

> Rename the macro sub AutoClose()
> or add the line
[quoted text clipped - 46 lines]
> >> Email cannot be acknowledged; please post all follow-ups to the
> >> newsgroup so all may benefit.
 
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.