Creating Microsoft Word Templates
The procedure that you use to create Microsoft Word templates depends on the version of Microsoft Office that you use.
You have setup the document template designer. For information about the prerequisites to use the document template designer, see Document Template Designer.
In SAP CRM, create a new document template.
Enter the template details. For example, the object type specifies the object for which the template is available.
Note
If you want to create the template in several languages, copy an existing template and change the texts (for a particular language).
Start the template designer.
The entries on the current page are saved and Microsoft Word opens in a new window.
In Microsoft Word, you can make the following settings for the XML structure:
Show XML tags in the document (that is, in your template).
List only child elements of the current selection to display the elements that you can add to the template.
Note
To avoid printing a parent, ensure that you do not select any of its attributes.
To start designing your template, choose an element to apply to your current selection in the XML structure.
The system displays a pair of XML tags.
Choose more elements to add them to the template.
Make your entries in the space between the XML tags so that you can see the child nodes.
To make space in the template, position your cursor between the XML tags and press the enter key repeatedly.
Format your entries between the XML tags as you want the final text to appear.
Note
There are 2 keywords, DATE and NUM. If you enter these keywords, the final text is treated as a date or number, and is formatted accordingly.
To add a table to your template, add elements to the template until you reach the element that you want in the table.
Drop a table with the relevant number of columns and 2 rows into the document. The first row of the document is where you enter the column headers for the table entries. The second row of the table is for the entries themselves.
Drop values from the list in the lower part of the XML pane into the relevant column in the second row of the table.
At runtime, the system adds more rows to reflect the actual number of entries.
To apply your own style of formatting, use standard Microsoft Word features to format entries you made in the template as you want them to appear in the final template.
Note
The default setting for Microsoft Word is regional formatting.
To save the template, choose Save
in Microsoft Word and then close Microsoft Word.
In SAP CRM, choose the Back
pushbutton.
In SAP CRM, create a new document template.
Enter the template details. For example, the object type specifies the object for which the template is available.
Start the template designer.
The system opens Microsoft Word and shows the SAP data panel with the SAP data structure. Note that you can choose to show or hide the SAP data panel on the SAP tab.
In Microsoft Word, drag and drop nodes from the SAP data panel into the Microsoft Word template. Note that you can create one–to–many relationships in the template (for example, items in a sales order) by dragging and dropping the parent node into the template.
Add column headers into the first rows of tables, as necessary. Note that you can delete unneeded columns.
Use the standard Microsoft Word features to format your content in the template. Note that the default setting in Microsoft Word is regional formatting.
In Microsoft Word, save your template.
In SAP CRM, choose the Back
pushbutton.
You can use your Microsoft Word template in SAP CRM as follows:
Find an object for which you created the template.
In the Attachments
assignment block, choose the With Template
pushbutton.
Select the template that you created.
The system opens a Microsoft Word document using the template that you created. The system fills the document with values from the CRM data by using the Web service and adds more rows as needed. Note that you can still edit the Microsoft Word document.
Save and close Microsoft Word.
The system attaches the document to the CRM object.