Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is posible pass parameter in the macro name ?

Is posible pass parameter in the macro name ???


error loading image

Thanks!

1 Reply
Not applicable
Author

Hi Felipe,

you cannot directly call sub with parameter. The way this can be done is with using variable. In the sub just read the variable content. Something like this:

sub ShowVariableContent

set v = ActiveDocument.Variables("vShow")

show = v.GetContent.String

msgbox(show)

end sub

Inside macro module you can use functions and pass them the value:



sub ShowVariableContent

set v = ActiveDocument.Variables("vShow")

show = v.GetContent.String

call ShowMessage(show)

end sub

function ShowMessage(msg)

msgbox(msg)

end function



Stefan