Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Wed, 9 Nov 2005 01:16:20 -0800,    group: microsoft.public.word.vba.customization        back       


Track Changes not working in word   
Hi,
I have an document in which I have written VBA code to accept/reject the 
changes that were made to the document using the track / revisions 
functionality in word. 
I am facing some problem wherein I am not able to accept/reject some of the 
revisions that were made to the document.
Can anyone help me why this is happening. I have no idea on this.
Regards
Sudhakara.T.P.
date: Wed, 9 Nov 2005 01:16:20 -0800   author:   Sudhakara.T.P.

Re: Track Changes not working in word   
Hi Sudhakara

ActiveDocument.Revisions.AcceptAll should work. But there are problems, at 
least in Word 2003, in the User Interface that makes it difficult to accept 
or reject some tracked changes. I most frequently encounter this with 
formatting changes in tables. It would not surprise me if the same changes 
were impossible to accept or reject in code, too.

Apart from that, the .Revisions collection is flaky. And, as you accept or 
reject revisions, obviously the number of revisions changes. So the best way 
may be to loop backwards using a counter. That is:

Dim lngCounter As Long
With ActiveDocument
    For lngCounter = .Revisions.Count To 1 Step -1
        .Revisions(lngCounter).Accept
    Next lngCounter
End With

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word


"Sudhakara.T.P."  wrote in message 
news:73413688-91A6-4AFF-A656-69E48F36FBC9@microsoft.com...
> Hi,
> I have an document in which I have written VBA code to accept/reject the
> changes that were made to the document using the track / revisions
> functionality in word.
> I am facing some problem wherein I am not able to accept/reject some of 
> the
> revisions that were made to the document.
> Can anyone help me why this is happening. I have no idea on this.
> Regards
> Sudhakara.T.P.
date: Sun, 13 Nov 2005 16:51:26 +1100   author:   Shauna Kelly

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us