Print or electronically complete Word form

I have created some word documents in 2010 using the form fields, if my customers are completing them electronically its fine but if they want to complete them by hand they have to print the document but it prints the form field guide text. I've found that I can format the form field guide text as hidden which will display if the appropriate box is marked in the Word options. Problem is that this is not a default to my knowledge but is too far advanced for my customers. Can anyone give me some guidance on how to use forms that can either be electronically completed or printed (neatly) and completed?
progressbusinessAsked:
Who is Participating?
 
GrahamSkanRetiredCommented:
The macros were designed to ensure that hidden text will not be printed, whatever the setting of the 'Print hidden text' option.

Don't try to run them. They will run when the document is being printed. They supplant the print Word commands, so it is necessary to code the print instructions inside the macros.


This macro should go in the ThisDocument module of the Template and will do the two things that you requested.

Private Sub Document_New()
    ActiveWindow.View.ShowHiddenText = True
    ActiveDocument.Protect wdAllowOnlyFormFields, True ', password
End Sub

Open in new window

0
 
tdlewisCommented:
Can you post the document (or something that shows what you're trying to accomplish)?

Regarding the showing of hidden text, an easy way to do it is press the paragraph mark in the Paragraph section of the Home tab.
0
 
GrahamSkanRetiredCommented:
If the documents don't have to be compatible with Word 2003 or earlier, you might like to try Content Controls instead.

Programatically they are slightly different from Form Fields, but they can be used on a forms-protected documents, and print as normal text.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
progressbusinessAuthor Commented:
This is part of the form that I need to make printable or able to be completed electronically.

What I've done is create a template using the content controls, I've edited the text to assist users with what information needs to be entered and currently have formatted it to hidden text so if I print it won't print. The problem is that unless you have the Show/Hide feature on you are unable to see the text electronically.

I can't use any custom software as I only have access to the main Office Suite (Word, Excel etc) and it has to be able to be edited easily.
120822-Application-Form.dotx
0
 
tdlewisCommented:
I don't have any problem printing the blank form or completing it in Word. When I print the blank form I get something that looks like the attached PDF.
testform.pdf
0
 
progressbusinessAuthor Commented:
What do you see when you open the form though to complete it electronically? Do you see the guiding text?
0
 
tdlewisCommented:
Yes. I've attached a screen shot.

For what it's worth, I tested in Word 2007. (I also have Word 2010 and Word mac: 2011 readily available if that would help.)
Screen-Shot-2012-09-08-at-10.48..png
0
 
progressbusinessAuthor Commented:
What you're seeing is with "hidden text" due to the show/hide function being on. By default neither the show/hide feature or the option to show hidden text is on, which is my issue. If I make the text visible so anyone can see it (without either feature turned on) what happens is that if the user wishes to print the form and write it by hand the text will show on the printed copy. It seems I can only do one or the other easily.

Any ideas on how I could possibly make it so I can print or write the form and still have the suggested text available?
0
 
tdlewisCommented:
I don't know of anything off hand. I've sent an inquiry to someone I work with who might know some Word trick that I've overlooked.

You should be able to get something to work using an AutoOpen macro in your template.
0
 
progressbusinessAuthor Commented:
Any news tdlewis? I've still had no success and gone with the electronic form only but any further answers would be appreciated.
0
 
GrahamSkanRetiredCommented:
It would need some VBA to achieve the full effect that you want.

You could try these two macros.
Sub FilePrint()
    Dim dlg As Dialog
    Dim Opt As Boolean
    
    Opt = Options.PrintHiddenText
    Options.PrintHiddenText = False
    Set dlg = Dialogs(wdDialogFilePrint)
    If dlg.Display = -1 Then
        dlg.Execute
    End If
    Options.PrintHiddenText = Opt
End Sub

Sub FilePrintDefault()
    Dim Opt As Boolean
    
    Opt = Options.PrintHiddenText
    Options.PrintHiddenText = False
    ActiveDocument.PrintOut
    Options.PrintHiddenText = Opt
End Sub

Open in new window

0
 
GrahamSkanRetiredCommented:
They need to be installed asis in a module of the Normal template.
0
 
progressbusinessAuthor Commented:
Thanks for the suggestion GrahamSkan. Is there any way to have it only work on the templates I create? Embedded in the forms I mean?
0
 
GrahamSkanRetiredCommented:
Just put it in each of the specific templates instead of the Normal template.
0
 
progressbusinessAuthor Commented:
Ok thanks for the starting point GrahamSkan, I've got the below for VBA (I am a complete newbie on this front) I need both procedures to run upon creation of a new document (based on the embedded template) or open (if we convert these to straight documents for use instead). Basically with the VB the way it currently is it stops in the first sub, and I don't know how to make it turn the HiddenText on ad then Protect the document.

*********
Sub Document_New()
Me.HiddenText
Me.ProtectsDocument
End Sub


Sub HiddenText()
   ActiveWindow.View.ShowHiddenText = Not _
   ActiveWindow.View.ShowHiddenText
End Sub

Sub ProtectsDocument()
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Else: ActiveDocument.Unprotect
End If
End Sub
**********

Any further assistance would be greatly appreciated.
0
 
GrahamSkanRetiredCommented:
If your code is in the ThisDocument module, it will toggle the ShowHiddenText and the Protection away from the template setting for any new document when is is created. It will stop after this is done.

The code in my last comment will ensure that Hidden text doesn't get printed. It should be in a module of the template. The macro names are important, since they will catch the relevant Word commands and execute instead of the commands.
0
 
progressbusinessAuthor Commented:
I've attempted to utilise your code GrahamSkan, however when I create a new document based on the template and enable the macros it doesn't appear to do anything. When I open the code and then play the macro it tries to print the document.

All I want is to create a macro which - upon creation of new document based on the template, turns the hidden text option on and then protects the document so only forms can be filled out. I don't need to include any don't print hidden text options as by default this is off.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.