Reply to topic  [ 3 posts ] 
Need a macro for track change 
Author Message

Joined: 2007-01-17 05:46:17
Posts: 145
Location: Tokyo, Japan
Hello,

I would like to have a macro that will "accept" all the track changes that are "isTextAttributesChanged". Here is the situation in which such a macro is needed. I have a long document in several versions. I can use MS Word to compare two of them, and generate a file in which all the differences are recorded as "history" or "track changes". I save the file as an rtf file, and open it in NWP, and I can see the differences in the track change panel. However, what I really need is only the text content changes, while there are too many "isTextAttributesChanged" only changes.

If I can "accept" all these "isTextAttributesChanged", I will only have the text content changes, so that it will be much easier to concentrate on them.

I think it is possible to write such a macro, but I don't know how...

Are there any kind souls who can help me to write such a macro (which, I guess, can be useful for other people too...).

Thank you very much in advance.

Best regard,

ni

_________________
Best regards,

Nobumi Iyanaga
Tokyo,
Japan


2014-06-13 06:37:13
Profile WWW
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Hi Nobumi,

from the way you describe the issue, the following should do the trick:

Code:
$doc = Document.active
foreach $change in  $doc.allTrackedChanges
    if $change.isTextAttributesChanged
        $change.accept
    end
end


I haven't tried this at all, so of course the usual disclaimers apply. (Try it on a back-up copy, etc.)


Attachments:
Accept_Formatting_Changes_Only.nwm [16.33 KiB]
Downloaded 161 times

_________________
philip
2014-06-13 07:27:25
Profile

Joined: 2007-01-17 05:46:17
Posts: 145
Location: Tokyo, Japan
Hello Philip,

Thank you for your prompt reply.

I tested your macro. It worked perfectly. I saved it as the macro "Track_change-keep-contents" : its speed is very surprising.

Thank you again for your kind help!

Nobumi

_________________
Best regards,

Nobumi Iyanaga
Tokyo,
Japan


2014-06-13 17:36:13
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software