How to use VBA to trigger formfield formatting

M

MattM

Hi, I have some form fields with number (#,###) or currency (£#,###)
formatting. I also have a VBA macro which calculates values based on these
and puts the results in other form fields.

It works fine except for the formatting; the last field the user has edited
is left in raw number format (000). To trigger the formatting the user has to
click on the field and press Tab.

Is there any way I can trigger this from VBA [preferably without resorting
to something nasty like formfield.result = format (formfield.result ,
"£#,###") ] ?

Thanks!
 
M

MattM

I got it working using
ActiveDocument.FormFields(sBkmName).Result =
ActiveDocument.FormFields(sBkmName).Result
Matt
 

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