How do I use a custom function?

M

Marco

This should be a simple but I cannot find the answer
anywhere in the help index.

I've created my own VB function in Word 2000 that converts
a number to text. For example, if a cell in a table holds
the number 1,234.56 it will return One thousand two
hundred and thrty four pounds 56 pence. It's called
F_AmountInWords. But I can work out how to use it in a
cell.

I've tried inserting a field with the field code
= AmountInWords (RIGHT) \* MERGEFORMAT

But it just returns "!Syntax Error,(." I gather this is
because the = function only uses built in function, but
how do I call one from Module1.

Many thanks,

Mark
 
D

Doug Robbins - Word MVP

Hi Marco,

You cannot use a userdefined function in a Word field. You will have to use
visual basic to replace/supplement the numeric entry with text.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top