Hi,
How can I use a function created in Macros on a Word document? for example:
I insert a mail merge field, which is a number, and this field will be an
input argument of the function:
1234 will input to the function
function changeItToMyNeed(insertfield)
'...my code here
End function
Thanks for any help.
Andrew
Andrew - 18 Nov 2004 07:07 GMT
Hi Andrew,
Your syntax for calling the function looks good. Do you want to know how to
assign 1234 to a variable so that you can call your function? Try selecting
the value and using the following code
Sub CallFunction()
Dim FieldValue As Integer
FieldValue = Selection
MsgBox (changeItToMyNeed(FieldValue))
End Sub
> Hi,
>
[quoted text clipped - 9 lines]
>
> Andrew