Passing variable to MS Word Macro
Passing variable to MS Word Macro
- Subject: Passing variable to MS Word Macro
- From: "Steve Suranie" <email@hidden>
- Date: Tue, 25 Feb 2003 15:24:49 -0500
- Thread-topic: applescript-users digest, Vol 3 #1378 - 14 msgs
I'm trying to pass the value of a variable to a MS Word Macro. I can send a string but not a variable:
tell application "Microsoft Word"
activate
do Visual Basic "dnwMSWMacro \"Hello, World!\""
end tell
Here's the macro:
Sub dnwMSWMacro(thisMessage)
'
' dnwMSWMacro Macro
' Macro recorded 2/25/03 by Advance News Magazines
'
MsgBox thisMessage
End Sub
But when I go to do something like this:
set magName to "Advance for Audiologists"
tell application "Microsoft Word"
activate
do Visual Basic "dnwMSWMacro magName
end tell
it bombs. I've tried variations on the syntax with no luck, backslash, no blackslash, quotes, no quotes, etc. I'm sure its just a syntax issue so if someone could point me in the right direction I'd be eternally grateful. (At least till my next problem arises) : )
Thanks
Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.