Adapting Form Letters
These topics discuss how to:
-
Modify the Word macros for the sample letters.
-
Modify the text in sample letter templates.
-
Add fields to sample letters.
-
Create new form letters.
Modifying the Word Macros for the Sample Letters
You specify several environment variables in each Microsoft Word macro so that it can find the Word templates and data extract files during the form letter process. For example, your network or workstation configuration may have some of the files in different locations than those specified in the macros, so you need to modify the PATH to reflect the correct locations.
Before you edit the existing macros (or create new ones), we recommend that you print copies of the Microsoft Word documents and macros and the report writer SQRs and study them carefully.
Note:
To make this change, you should be familiar with Microsoft Word templates and macros and with your report writer.
All of the macros are attached to a file in the \PS\WINWORD directory. (Your path may differ, depending on your installation, but you can always find the file in a WINWORD subdirectory.) They are attached to an empty Microsoft Word file called empty.doc.
To modify a macro:
-
In Microsoft Word, open the empty.doc file.
-
Select
-
In the Macros in field, select Stdltr (template).
-
Highlight the macro that you want to modify and click Edit.
Modifying the Text in Sample Letter Templates
The form letter templates that are delivered with PeopleSoft HCM contain sample text for different types of tasks, which you can change to suit your needs. For example, you'll probably want to change the sender names in the letters to the names of the employees in your organization who are responsible for administering the tasks. If you need to modify only the text, without changing any fields that are used or pages and tables that are referenced in PeopleSoft Human Resources, use the following procedure.
To modify the text in a form letter:
-
Find the Word letter template to update.
Templates are located in the directory \PS\WINWORD.
-
In Microsoft Word, open the document that you want to modify.
If you see " "in the document, select then select the Field codes check box.
-
Make changes to the text as you would in any other document, and save the file.
WARNING:
Don't overwrite the field codes (enclosed in curly brackets). They are the placeholders for the values that are extracted from PeopleSoft Human Resources.
Adding Fields to Sample Letters
In addition to updating the text of a sample letter, you can include other types of data from PeopleSoft HCM.
Note:
To make this change, you should be familiar with Microsoft Word fields and the report writer used to extract data values from your PeopleSoft Human Resources database.
To use additional fields in form letters:
-
Add field codes to the form letter templates for any new data types that you want to include.
-
Modify the SQR that extracts data from PeopleSoft Human Resources so that it retrieves values from all of the fields that you want to use and writes them to the appropriate data extract files.
For example, to include currencies in the notification letter rollover.doc, add a Currency field code to the form letter template. Also add a variable for currency in pastdext.sqr so that the SQR retrieves the currency value and writes it to the data extract file.
Here's what the data extract file looks like before the change:
LANG,NAME,PLAN,ADDR1,ADDR2,ADDR3,NATIONAL_ID,CURDATEUSA", "Mr. John Matson","BEN01", . . . , "May 15, 1993"Here's what it looks like after the change:
LANG,NAME,PLAN,ADDR1,ADDR2,ADDR3,NATIONAL_ID,CURDATE,CurrencyUSA", "Mr. John Matson","BEN01", . . . , "May 15, 1993","US Dollars"
Creating New Form Letters
You can create form letters for different purposes. For example, you might want to send out form letters about their benefit plans to be signed by employees.
To create a new form letter:
-
Create a Word letter template, including the appropriate text, field codes, and data statement reference.
You might find it easier to adapt an existing form letter template than to create a new one. Look through the form letter templates to see if there's one that needs only minor modifications to serve as a new form letter template.
-
Create the SQR that selects and extracts data from other PeopleSoft Human Resources tables and stores it in a separate data extract file.
-
Create a new macro that is able to read the extracted data and merge it with the Word letter template.
You might find it easier to copy an existing macro and adapt it.
Note:
To link your new letter to PeopleSoft Process Scheduler, ask your human resources project leader or see the references below.
See PeopleTools: PeopleSoft Process Scheduler.