make macro run through entire doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
make macro run through entire doc
I have manged to create a macro in 5.4 to find/replace a certain attribute. How would I get this macro to run from beginning to end of doc.
Solved! Go to Solution.
- Tags:
- macros
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Carol,
If you're not already, you can use the ACL function, oid_find_child_attrs(oid, arr, attr[, value, flags]). This will build an array of all of the descendant oids from the specified oid with attributes matching a certain value. If you set the starting oid to oid_root(), then it will search the entire document. Then you can iterate over the array with your replacement code to modify the attributes.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Carol,
If you're not already, you can use the ACL function, oid_find_child_attrs(oid, arr, attr[, value, flags]). This will build an array of all of the descendant oids from the specified oid with attributes matching a certain value. If you set the starting oid to oid_root(), then it will search the entire document. Then you can iterate over the array with your replacement code to modify the attributes.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Carol,
Please let us know if Jeff's answer was what you were looking for, or if you had any follow-up questions for the Community. Thanks!
Rafael
