Title: Template Automation
1Template Automation
- CWS/CMS Project
- Customer Relations Section
- System Support Consultants
2Introduction
- This presentation by the CWS/CMS System Support
Consultants will help bring an understanding to
the template automation process. - Before proceeding further
- Open this presentation in the PowerPoint
application. - Click on View located on the menu bar.
- Click on Notes Page.
- By performing the above additional information
will be available as notes below the slide.
3Topics of Discussion
Section
Page(s)
Contents
A.
5-6
Create a template
B.
7-8
Form Fields
C.
9-12
Bookmarks - Add, Copy, and View
13-17
Automate a New Template
D.
E.
18-23
Automate an Existing Template
24
Spell Check
F.
25-28
Protecting the Template
G.
4Topics of Discussion (cont.)
Section
Page(s)
Contents
H.
29-30
Protecting the Macro
I.
31
Input into CMS Application
Input into CMS Application
J.
32-33
Input into CMS Application
34
Summary
35
Testing
5A. Create Template
- Before you create your template in Microsoft Word
- Create a new Word document
- Go to Tools drop-down menu check these options
- General tab
- Macro virus protection
- View tab
- Field shading Always
- Click on OK
- Click on Show/Hide button (standard toolbar)
6A. Create Template, Cont. (Creating a basic
template)
- In the save as dialog box
- 1. Choose where you want to store your template.
(e.g., c\Templates\Access\)
- 2. Name your template
- 3. Set Save as type as
- Document Template
- 4. Click on Save
1.
4.
2.
3.
7B. Form Fields
- County Template Data Elements Bookmark Names
are available on the CWS/CMS Web site in the
Application Resources page. - Go to http//www.hwcws.cahwnet.gov/
- Click on Application Resources
- Look under Non-CWS/CMS Guides
- Click on
- Attachment County Template Data Elements and
Bookmark Names
8B. Form Fields, cont.
- Open Form Fields Toolbar
- Select View, Toolbars, Forms from the dropdown
menu - Place cursor where you want text to populate
- Select ab from Forms toolbar
9C. Bookmarks - Add Bookmarks
10C. Bookmarks - Copy Bookmarks
11C. Copy Bookmarks, cont
- Place cursor where you will copy the form field.
- Hold Ctrl Key and hit F9
- Cursor should be between the two dots
- Paste bookmark using Ctrl V
- While cursor is still in this field, right click
to bring up short cut menu and select Update
Field - Your copied field should now look like this
12C. Bookmarks - To View Results
- To view the names of your Update Fields
- Select Tools, Options, View tab and check Field
Codes.
13D. Automate the Template(Use With a New Template)
- Click on Tools (in the drop down menu)
- Click on Macro
- Click on Visual Basic Editor
14D. Automate the Template, cont. (Use with
a new template)
- Highlight your template project
- Click on Insert drop-down and Module
- A module is inserted in the project window
- A blank screen appears to the right of the
project window (code window)
15D. Automate the Template, cont. (Use with a
new template)
- Rename module
- Click on Module 1 in the Properties section
- Re-name the module as CreateReport
16D. Automate the Template, cont. (Use with a
new template)
- Copy paste the macros from the
MasterMacro.doc into the code window.
17D. Automate the Template, cont. (Use with a
new template)
- Click on the File (drop down menu)
- Click on Close and return to Microsoft word
- Protect your template (Go to G page 25)
- Save and Close your template.
18E. Automate the Template, cont.(Use with
existing template that has CreateReport macro)
- If you previously created a template using the
automation features and bookmarks you will need
to edit that templates CreateReport macro
module in the visual basic editor.
19E. Automate the Template, cont.(Use with
existing template that has CreateReport macro)
- Open your existing template
- 1. Go to Tools (in the drop down menu)
- 2. Click on Macro
- 3. Click on Visual Basic Editor
20E. Automate the Template, cont.(Use with
existing template that has CreateReport macro)
21E. Automate the Template, cont.(Use with
existing template that has CreateReport macro)
Place cursor beneath the End Sub statement and
paste the hdrupdt and AutoClose macros.
22E. Automate the Template, cont.(Use with
existing template that has create macro coding)
- Edit the macro in the code window.
- Copy or type the word hdrupdt above the first
End Sub. - Refer to the picture.
23E. Automate the Template, cont.(Use with
existing template that has create macro coding)
- Click on the File (drop down menu)
- Click on Close and return to Microsoft word
- Protect the template before saving.
24F. Spell Check
- Upon closing the document in Word when using the
CWS/CMS application
- If saving to database without closing document
first - You will see the hanging hourglass
- Click on Word Task Bar button to access Spell
Check dialog - Screen freezes can sometimes be resolvedusing
the above procedure.
25G. Protecting the template (without
password protection)
- Select Tools
- Protect document
- Select forms
- Select OK
- Save and Close your template
26G. Protecting the template (with password
protection)
- Select Tools
- Protect document
- Select forms
- Enter password
- Select OK
27G. Protecting the template , cont. (with
password protection)
- Open Visual Basic Editor
- Select your template project
- Double-click on CreateReport located in
the Modules folder - Go to the section labeled Spellcheck
macro in the code window.
28G. Protecting the template, cont. (with
password protection)
- You will add the password for protecting
the document to two places in the code
window. - Look for code
- Password
- Enter the password to be used between the
quotation marks
29H. Protecting the macro
- Consider if using password protection for
document - Right-click on the template project
- Click on Project Properties
- Dialog opens
30H. Protecting the macro, cont.
- Click on the protection tab
- Click on Lock Project for Viewing
- Enter password
- Click on OK
- Click on Close and return to Microsoft word
- Close template
31I. Populating Header and/or Footer Information
- Form fields cannot be inserted into headers or
footers. - There are two ways to auto-populate headers
footers - Using CtrlF9 if header/footer data exists in
the body of the document (where document text
exists) - Creating the header/footer information in the
body of the document before auto populating
headers/footers if header/footer data doesnt
exist in the body of the document.
32J. Input Into CMS Application
- Open Resource Management
- Select Orange Section - operations
- Select Create New Template Management
- Complete Mandatory fields
- Template DOS Filename Prefix Use 5 letters or
numbers - Title You can use up to 40 characters.
- The Template title displays in either the
Create New Document - Case or -
Referral dialog boxes.
33J. Input Into CMS Application, cont.
- Select ACTION from the drop down menu
- Select Add Template
- Find your Directory and template
- Click on your file
- Click on open
- SAVE TO DATABASE
- Note If you wish to review your work in client
services, you must restart your computer.
34Template Automation
- Insert the CreateReport macro into template
- Open Visual Basic Editor
- Insert New Module
- Paste Contents of MasterMacro Document
- Change Module Name to CreateReport
35Testing CWS/CMS Template Auto-population
These steps can be taken after completing the
local template, but before loading it into the
Application via Resource Management. If this test
reveals any problems with your new template, they
can be corrected first, avoiding the need to
disable a defective template. (Disabled templates
remain in the System Administrators list, quite
annoying, although users do not see them from
Client Services.) This test is to be done on a
single CWS/CMS workstation. Please refer to
notes.