Link to home
Start Free TrialLog in
Avatar of dogbertius
dogbertius

asked on

Word 2007 VBA Macros Disappear

I have a bunch of macros written in VBscript that I run from a Macro-Enabled Word Document (.DOCM) in MS Word 2007.

In general, all of my macros work, except one that I recently changed to accept an argument/function parameter. This is designed to allow me to parameterize an existing function. For some reason, whenever I give my vba macros the ability to use function parameters, they disappear on me. Any suggestions?

Thank you,


The code is:

Sub RunMyFavMacro(sParam1 As String)
     MSG(sParam1)
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of suvmitra
suvmitra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dogbertius
dogbertius

ASKER

There is another post on here (which I can't find anymore) which described setting a .param field

Basically, with VB in Word (2007) I can't directly pass formal function parameters as I could in a stronger language like C. Instead, I need to define .param  entries and then issue lengthy callbacks. Good thing this is a simple app :)