Moving Word VBA to AS
Moving Word VBA to AS
- Subject: Moving Word VBA to AS
- From: Michael Ghilissen <email@hidden>
- Date: Thu, 14 Jun 2007 10:04:57 -0400
Hi List,
I have a heck of a time moving my Word VBA macros to AS, in view of the next MS Office release.
1/ I need to delete text within brackets
VBA version
With Selection.Find .Text = "\[*\]" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll
AS version
set selFind to find object of myrange set forward of selFind to true set match wildcards of selFind to true set wrap of selFind to find continue tell selFind set content to "\\[.*\\]" set content of replacement of selFind to "" execute find wrap find find continue replace replace all with match forward end tell
2/ I need to delete hyperlinks
VBA version
Do Until ActiveDocument.Hyperlinks.Count = 0 ActiveDocument.Hyperlinks(1).Delete Loop
AS version
set theHlist to (count of hyperlink objects of selection) repeat with i from (theHlist) to 1 by -1 -- delete hyperlink object i of selection ????? end repeat
Any guru to help me?
Thanks much,
Michael |
_______________________________________________
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