RE: selective deletion of footnote references in MS Word 2004...
RE: selective deletion of footnote references in MS Word 2004...
- Subject: RE: selective deletion of footnote references in MS Word 2004...
- From: Scott Babcock <email@hidden>
- Date: Fri, 1 Feb 2008 10:40:44 -0800
- Acceptlanguage: en-US
- Thread-topic: selective deletion of footnote references in MS Word 2004...
You're on the right track, but you need something like this to search for the footnote marks:
tell application "Microsoft Word"
set myDoc to active document
set fieldCount to (count fields in myDoc)
repeat with n from 1 to fieldCount
select field n of myDoc
collapse range text object of selection direction collapse end
set myFind to find object of selection
if (execute find myFind find text "^f") then
cut object selection
end if
end repeat
end tell
The "^f" string is the format representation of a footnote mark. You can get this from the "Find" user interface by selecting "Footnote Mark" from the "Special" popup on the "Find and Replace" dialog and seeing what shows up in the "Find what" field. (The "Special" popup is one of the advanced "Find" settings. If the advanced settings are not already shown, you'll need to reveal them by clicking on the disclosure triangle.)
NOTE: If you want to find a literal "^f", you need to use "^^f" as your search text. This is true in the UI as it is in the API.
_______________________________________________
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