selective deletion of footnote references in MS Word 2004...
selective deletion of footnote references in MS Word 2004...
- Subject: selective deletion of footnote references in MS Word 2004...
- From: Conor McDonough <email@hidden>
- Date: Wed, 30 Jan 2008 22:12:19 -0500
I have written a script that inserts footnotes immediately after special Add-In fields placed into .doc files. The problem is that I can't figure out how to write another script that selectively deletes these automated footnotes while sparing footnotes that do not immediately follow these special Add-In fields. The following script doesn't work, because (I think) it expects me to provide a footnote number, which I am not certain how to do. Is it possible to just have the script look for any number, because that would work. My ultimate question is, is there a way to get Word to search a text selection for the presence of any footnote reference? My search of the Word scripting guide hasn't made it clear.
tell application "Microsoft Word" set myDoc to active document set fieldCount to count of fields in myDoc repeat with n from 1 to fieldCount select field n of myDoc collapse range text object of selection direction collapse end expand text object of selection by a character item set myFind to find object of selection clear formatting myFind set content of myFind to note reference of footnote --here is where I think the footnote number is desired, but not feasibly provided if (execute find myFind with match forward) is true then cut object selection end if end repeat end tell
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden