?
Solved

Print or electronically complete Word form

Posted on 2012-09-02
17
Medium Priority
?
361 Views
Last Modified: 2012-10-29
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?
0
Comment
Question by:progressbusiness
  • 7
  • 6
  • 4
17 Comments
 
LVL 10

Expert Comment

by:tdlewis
ID: 38359783
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
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 38360187
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
 

Author Comment

by:progressbusiness
ID: 38371727
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:tdlewis
ID: 38380357
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
 

Author Comment

by:progressbusiness
ID: 38380380
What do you see when you open the form though to complete it electronically? Do you see the guiding text?
0
 
LVL 10

Expert Comment

by:tdlewis
ID: 38380392
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
 

Author Comment

by:progressbusiness
ID: 38380398
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
 
LVL 10

Expert Comment

by:tdlewis
ID: 38380417
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
 

Author Comment

by:progressbusiness
ID: 38427868
Any news tdlewis? I've still had no success and gone with the electronic form only but any further answers would be appreciated.
0
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 38427925
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
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 38427926
They need to be installed asis in a module of the Normal template.
0
 

Author Comment

by:progressbusiness
ID: 38428200
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
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 38428218
Just put it in each of the specific templates instead of the Normal template.
0
 

Author Comment

by:progressbusiness
ID: 38537479
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
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 38537707
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
 

Author Comment

by:progressbusiness
ID: 38543781
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
 
LVL 77

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 38543857
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question