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 2006

Tip: Looking for answers? Try searching our database.

Macros to delete track changes and comments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lkthompson - 30 Aug 2006 15:49 GMT
Is there a macro code that I could use to remove all track changes and
comments (not just hide them) before saving and sending a document? I've
tried the Reject and Accept Changes, but sometimes if I click Reject all
changes, it takes away changes that weren't tracked to begin with. And I
always have to go to View > Markup, making sure that markup is checked, in
order to reject and accept. Sometimes I'll have to delete comments
separately, sometimes I just click Accept all changes and it gets rid of
them. Is there one process that will work the same for everyone? (everyone
here is upgrading to 2003 and we have to republish some old docs)

This is confusing to instruct others about, since docs were saved in
different ways with different kinds of markups. I don't want to use the
Remove Hidden Data tool because it messes up templates and other settings.

thanks
Greg Maxey - 30 Aug 2006 16:01 GMT
This has not been extensively tested, but appears to do what you ask:

Sub TC()
Dim oRev As Revision
Dim oCom As Comment
Dim i As Long
For Each oRev In ActiveDocument.Revisions
 oRev.Accept
Next oRev
For i = ActiveDocument.Comments.Count To 1 Step -1
 ActiveDocument.Comments(i).Delete
Next i

End Sub

> Is there a macro code that I could use to remove all track changes and
> comments (not just hide them) before saving and sending a document? I've
[quoted text clipped - 11 lines]
>
> thanks
lkthompson - 30 Aug 2006 16:21 GMT
Wow, thanks Greg! It did work..I just accepted all changes after it removed
everything!! I was trying to test it a second time, but could not find the
macro again. I have do not usually use macros, so I don't know how to save
them. I thought it was saved, but what are the steps to save? When I open the
documents and go to View/Visual Basic then click on the arrow to run macro,
it isn't there...

thanks again

> This has not been extensively tested, but appears to do what you ask:
>
[quoted text clipped - 26 lines]
> >
> > thanks
Greg Maxey - 30 Aug 2006 16:36 GMT
See:

http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

> Wow, thanks Greg! It did work..I just accepted all changes after it removed
> everything!! I was trying to test it a second time, but could not find the
[quoted text clipped - 35 lines]
> > >
> > > thanks
lkthompson - 30 Aug 2006 17:51 GMT
Thanks again. I tried the file save and the first time I ran the macro, I saw
it on the macro list, and it ran fine. However, after I closed word and
reopened the same document (I did not save changes), when I tried to run the
macro (went to visual basic toolbar and tools/macros), it wasn't on the list!
I even tried the one called Macro1, because I thought that's what I might
have saved the other as, but that didn't work either. Do you have to create
the macro each time? I just want to be able to see it in the macro list so
it's easier to run.

thanks

> See:
>
[quoted text clipped - 39 lines]
> > > >
> > > > thanks
Greg Maxey - 30 Aug 2006 19:59 GMT
Put the macro in the template project vice the document.  And then you
will have to save the template before exiting Word.

> Thanks again. I tried the file save and the first time I ran the macro, I saw
> it on the macro list, and it ran fine. However, after I closed word and
[quoted text clipped - 50 lines]
> > > > >
> > > > > thanks
lkthompson - 30 Aug 2006 20:26 GMT
Thanks so much for all your help!

I actually just downloaded a patch to fix Adobe 7, and it took care of it,
so now it's able to save. Kind of strange but it works!

> Put the macro in the template project vice the document.  And then you
> will have to save the template before exiting Word.
[quoted text clipped - 53 lines]
> > > > > >
> > > > > > thanks
 
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.