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
Need a macro for track change
-
- Posts: 158
- Joined: 2007-01-17 05:46:17
- Location: Tokyo, Japan
- Contact:
Need a macro for track change
Best regards,
Nobumi Iyanaga
Tokyo,
Japan
Nobumi Iyanaga
Tokyo,
Japan
Re: Need a macro for track change
Hi Nobumi,
from the way you describe the issue, the following should do the trick:
I haven't tried this at all, so of course the usual disclaimers apply. (Try it on a back-up copy, etc.)
from the way you describe the issue, the following should do the trick:
Code: Select all
$doc = Document.active
foreach $change in $doc.allTrackedChanges
if $change.isTextAttributesChanged
$change.accept
end
end
- Attachments
-
Accept_Formatting_Changes_Only.nwm
- (16.33 KiB) Downloaded 885 times
philip
-
- Posts: 158
- Joined: 2007-01-17 05:46:17
- Location: Tokyo, Japan
- Contact:
Re: Need a macro for track change
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
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
Nobumi Iyanaga
Tokyo,
Japan