Word 2007 - content of FormField disappears when printing

P

Patrick Jox

Hello,
I adapted a word template from a client where the document is filled out
using VB.NET and office automation.The document has several form fields
which are filled using

doc.FormFields("Field01").Result = "Hello World"

This works. When I activate the application and set visiblity to true then I
see what was entered by code. But then when I printout the document either
by code or by the gui, the formfields seem to refresh to nothing.

Fortunatly this happens only on the clients dev machine and not on
productive machines. So I guess this must be an option within word which
causes this behaviour.So i checked under word options / advanced. In the
regions "Printing" or "When document is printed" I expected to find an
option that explains what's happening. But did not.

Any explanations / ideas

Kind regards
Patrick
 
C

Cindy M.

Hi Patrick,
I adapted a word template from a client where the document is filled out
using VB.NET and office automation.The document has several form fields
which are filled using

doc.FormFields("Field01").Result = "Hello World"

This works. When I activate the application and set visiblity to true then I
see what was entered by code. But then when I printout the document either
by code or by the gui, the formfields seem to refresh to nothing

Most likely, the document Form Protection is not activated *and* the option to
update fields when printing is. Turning on the forms protection (doc.Protect
'parameters here) would be the correct and most reliable way to overcome the
issue.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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