Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    413
    Thanks
    3
    Thanked 1 Time in 1 Post

    Word 2010: can there be forms without templates?

    I've been asked to write some procedures for my company, and they require the use of forms. When I sent the work to my boss for comment, he said in effect, "Hey, this has gotten 'way out of control. The forms are nice, but no one's going to go through the rigmarole of installing special templates to use them."

    Gee. OK. We need forms, but we don't want templates. Is there a way to do that?

    One possibility I thought of is an installer that automatically puts the templates in the right place. I think it would have to be written in VBA to find the right directory without a great deal of work. If anyone has tried this, how did it work out?
    Last edited by jsachs177; 2011-11-23 at 11:50.

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Word templates do offer some features you can't get with a Word document. I think particularly of a template's ability to store AutoText, and its ability to supply macro functionality without having them embedded in the document (which can cause alarm bells to ring in Word). If you don't need these feature, then a document will do just as well -- assuming users don't accidentally overwrite it.

    For template installation on Windows XP, I used Inno Setup. I haven't tried it on Windows 7, so I don't know whether the higher security would pose an issue.

    Thread with example installer scripts: Inno Setup Scripts

  4. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts
    Another alternative for using simple documents as templates (as long as, per jscher's comment, the forms don't need to make use of any features that require templates such as autotext or macros), is to distribute the 'documents as templates' via e-mail, and instruct the users to save them to a designated folder they can create, such as "My Documents/Form Templates".

    They can then create new documents from the 'templates' (without ever opening the documents themselves) by using File > New > New From Existing > and then navigating to the location of the document to copy.

    Gary

  5. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,672
    Thanks
    50
    Thanked 61 Times in 59 Posts
    The following puts a template in the Word Startup folder to load it as an Add-In

    Code:
    Sub SaveToStartUpPath()
    '   Macro written by Charles Kyle Kenyon
    '   Saves template containing this macro to Word Startup Folder for use as a global template
    '
    '
        On Error Resume Next
        '
        Dim Response As String, temp As String, x As VbMsgBoxResult
        Selection.Collapse
        If ActiveDocument.Type = wdTypeDocument Then
            GoTo WhoopsDocument
           Else
             x = MsgBox("Click OK to continue saving " & ActiveDocument.Name & " to " & Application.StartupPath, vbInformation + vbOKCancel, _
           "Ready to save template to your StartUpPath which is " & Application.StartupPath)
            If x = vbCancel Then GoTo EndofSub
        End If
        If ActiveDocument.Type = wdTypeTemplate Then
                    ActiveDocument.SaveAs FileName:= _
            Application.StartupPath & "\" & ActiveDocument.Name, _
            FileFormat:=wdFormatTemplate, LockComments:=False, Password:="", _
            AddToRecentFiles:=False, WritePassword:="", ReadOnlyRecommended:=False, _
            EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
            :=False, SaveAsAOCELetter:=False
        End If
        x = MsgBox(ActiveDocument.Name & " Add-In template saved. It will be active next time you start Word.", vbOKOnly & vbInformation, ActiveDocument.Name & " saved in " & Application.StartupPath)
    
    GoTo EndofSub
    
    WhoopsDocument:
            x = MsgBox("Sorry, you need to be using the template. Please go back to the " & ActiveDocument.AttachedTemplate.Name & " template and Open it, then try this again!", vbExclamation, _
           "Sorry!")
    EndofSub:
    
    On Error GoTo 0
    End Sub
    -----------------

    The following will return the user templates folder path. You could store your template there using vba.
    application.Options.DefaultFilePath(wdUserTemplate sPath)


    On a side note (rant) if there are two things a Word user should get a handle on, they are Styles and Templates. Neither is all that hard and using them properly can make a person so much more productive! The basic idea of a template is that you can set something up the way you want and repeat it forever as needed. You don't have to worry about someone accidentally messing it up.

    Protected forms can give you some of this functionality and while they don't have to be templates, that gives them one more layer of protection.
    Last edited by Charles Kenyon; 2011-12-01 at 01:57. Reason: Corrected code
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #5
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    413
    Thanks
    3
    Thanked 1 Time in 1 Post
    The particular feature I believe we'd lose if we didn't use templates is the ability to save the fields only.

    Gary, the approach you suggested is the one I'm using now, which my boss said is too complicated.

    Charles, the macro is essentially the alternative solution I proposed. (I may not have made it clear that writing the macro is not an obstacle for me so much as having to use and maintain the macro is an obstacle for the organization.) Re your side note, I agree, but my objective is to encourage compliance with a procedure; forcing my users to learn new concepts in order to comply would defeat that goal, however good it would be for the users if they cooperated!

    My boss decided that paper forms are perfectly OK for now, and considering the organization's present size, I think he's right. In that sense, the problem is solved. When we need to automate the forms, we'll just have to deal with one solution or the other.

  7. #6
    4 Star Lounger
    Join Date
    Mar 2011
    Posts
    540
    Thanks
    3
    Thanked 33 Times in 28 Posts
    This isn’t Word but it is certainly Office 2010 if you have the right version: Office InfoPath is an application that I think is dedicated to a wide variety of forms, and from the sound of your post, you would only require one copy of it. I have it in my version of Office, but I have never really studied nor used it, but it might fill the bill, and I suggest you learn what you can online (e.g. HERE) or from a textbook, and download a trial if possible. It’s so far off the map that I’ve never run across many discussions of it, so if it turns out to be of value I’m sure we’d be interested to hear of it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •