Link to home
Start Free TrialLog in
Avatar of progressbusiness
progressbusinessFlag for Australia

asked on

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?
Avatar of tdlewis
tdlewis
Flag of United States of America image

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.
Avatar of GrahamSkan
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.
Avatar of progressbusiness

ASKER

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
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
What do you see when you open the form though to complete it electronically? Do you see the guiding text?
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
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?
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.
Any news tdlewis? I've still had no success and gone with the electronic form only but any further answers would be appreciated.
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

They need to be installed asis in a module of the Normal template.
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?
Just put it in each of the specific templates instead of the Normal template.
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.
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial