Is a Non-Printing Field possible?

A

Angyl

Two quick questions:

I'm working on a form where $$s will be entered that we DON'T WANT PRINTED
on the final product. Is it possible to set certain fields to NOT print?

Secondly, I'm new to basic code and I was wondering if you could tell me
what the code would look like for a field that automatically multiplied what
the user entered by .95

I just don't know the syntax...once I see a sample of it, I should be able
to do the rest of the calculations myself. Thanks!

Oh, sorry, one more quesiton. If I name a field "TextBox1" how do I call it
in a function? (I.E. =[TextBox1] + .04)

Thanks!
 
J

Jezebel

Angyl said:
Two quick questions:

I'm working on a form where $$s will be entered that we DON'T WANT PRINTED
on the final product. Is it possible to set certain fields to NOT print?

No easy way to do this other than to format it as hidden. If the point of
these fields is to provide data to use in calculations, you could put the
values into Document Properties instead.

Secondly, I'm new to basic code and I was wondering if you could tell me
what the code would look like for a field that automatically multiplied
what
the user entered by .95

{ = { FieldName } * 0.95 }

I just don't know the syntax...once I see a sample of it, I should be able
to do the rest of the calculations myself. Thanks!

Oh, sorry, one more quesiton. If I name a field "TextBox1" how do I call
it
in a function? (I.E. =[TextBox1] + .04)

You can use either

ActiveDocument.FormFields("TextBox1").Result

or

ActiveDocument.Bookmarks("Textbox1").Range

In both cases you'll need to do some checking or put in an error-handler, to
allow for the possibility that the user's entry is a number. And you should
give your fields meaningful names.
 
C

Charles Kenyon

You can mark a formfield to be hidden text and display hidden text. These
will ordinarily not print. Better, though, would be to use a UserForm to
gather this information and store it as document variables or properties
which could be used in vba calculations.
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

The name of a formfield is also a bookmark name for that formfield's
contents. You can reference it as you can any other bookmark and use it in a
REF field or a calculation {=} field. What you are talking about is what
Word calls an "online form." For more about online forms, follow the links
at http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customization/FillinTheBlanks.htm especially Dian
Chapman's series of articles. You may also want to look at
http://www.word.mvps.org/FAQs/TblsFldsFms/LinesInForms.htm.

UserForms and Online Forms are completely separate concepts and they can be
used together. Work through Dian Chapman's articles to see how.

Hope this helps,
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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