I have had to create several Word Templates where the document was created in SWPDM from a Template.
So, I figured I would create a process on the forum so I would be able to find it in the future.
Hope it is helpful to someone else.
Open Word --> Right Click on the ribbon blank space and select "Customize the Ribbon..."
On the "Customize Ribbon" tab find a section on the "Insert" tab that is (Custom) or create a new one.
I don't remember if "Quick Parts (Custom) was already on my Insert tab but that is the one I selected.
If you don't have a section that says Custom then you will need to create a New Group using the button.
Then, switch to "All Commands" in the "Choose commands from:" dropdown menu.
Scroll down and highlight "Field" then select the Custom group you created and click the "Add >>" button.
Use the UP/Down arrows to change the position in the group then click the "OK" button.
You should now have the Field option on the Insert ribbon.
Now you need to create some Custom Properties that you can tie you PDM variables to.
Click "File"
Then click "Info"
Click "Properties" then click the "Advanced Properties" box that comes up.
Create the custom properties you need for your document.
Type in the Name and value then click the "Add" button. It is best to leave it as a Text value even if you will be using it as a date. I have had issues with it always putting the previous days date in the field. I have read the knowledge base articles about this and nothing fixed it for me.
For this tutorial also include a property called "Watermark" and add the text "DRAFT"
Click the "OK" button when you are finished.
Click the arrow to return to the document.
Select the text on the document that you want to link to the custom property then click the "Field" button.
*** You can link text in the Header, Footer, or body of the document.
When the "Field" dialog comes up select "DocProperty" in the "Field Names:" column, then select the desired property in the "Properties" column and click the "OK" button to complete the selection.
The Text should now update to whatever you typed into the custom property.
In Header Edit mode (double click on the header or footer area).
Create a Text Box and position it in the middle of the document angled.
Type in some text and then link it to the custom property so that DRAFT shows up in it.
I found that if you have it too steep then the preview in SWPDM messes it up by put it vertical. It is better if it is horizontally displayed.
I found that 320° works good for this.
Right click on the boarder of the text box then select "More Layout Options..." from the menu.
Here are examples of the two ways it will display in the SWPDM preview:
Once you get all your text link to the custom properties using the Fields button Save the document Template and Check the file into SWPDM. *** You can exit Word if you didn't already do it.
Go into the SWPDM Administration Tool and create new variables for all the custom properties you created in Word.
The Variable name does not have to be the same but the Attribute name has to match the name of the Word property.
Create a Text variable with the following Attributes: "Block name" = "CustomProperty", "Attribute name = "Doc Number", and the File Extensions of any file type you want to have associated with this variable.
*** You could have the custom property value used on SolidWorks parts, assemblies and/or drawings by adding those file extensions.
Create a New Serial number to use for this Template.
Right Click "Serial Numbers" and select "New Serial Number" from the menu.
Give the serial number a name and then put in how you want to create the number.
Click the "OK" button when finished.
*** To get the changeable information you would use the left arrow highlighted with the teal box.
Create the File and Template cards with the variables you want to have on your document.
The template card is what the user will fill out when they create a new file from the Template in SWPDM so only include the variables you want them to update when initially creating the file.
Right Click on "Templates" and select "New Template" from the menu.
Name the Template. *** Use a slash in the name to create a sub menu item in the Windows Explorer right menu list.
Switch to the "Execute as" tab and make sure "Use permissions from the logged in User." is selected.
Switch to the "Template Cards" tab and click the "Add Card..." button.
Select the Template card you created earlier and click the "OK" button.
Click the "Template Variables" button.
Create the Number variable by selecting "Serial Number" from the "Type:" dropdown, then selecting the serial number you created earlier in the "Serial Number" dropdown.
Then create the rest of the template variables using the "Type" set to "Format String"
*** You can enter something in the "Text String" field if you want to, but unless you select to prompt the user it will not show what you type in so "New Variable" text is fine.
*** I put "T-" in front of the variable name to help me quickly notice that it is the template variable instead of the SWPDM variable.
I also created the T-CreatedBy variable linked to the name of the logged in user.
Once done with all the variables click the "OK" button to go back to the "Template Cards" tab.
Link the SWPDM variables to the Template variables by clicking the dropdown in line with each variable and select the Template variable from the list.
Select the Yellow folder icon to browse to the location you want to use as the root folder for the document created by the template. If you want to just create it in the folder the user is currently in just leave it as is.
Click the Green folder icon to create a new sub folder for the file to be created in. *** If the new folder already exists it will not create a new one it will just put the new file in the existing folder.
Select the New folder created and then click the button to create a new template using an existing file.
Browse to where you saved the Word Template, select it and click the "OK" button.
Click the arrow by each template variable to select the corrisponding SWPDM variable.
The SWPDM variable list can be very long. There are two ways to move around in the list. 1. You can type the first letter of the first word - then PDM will move the list so that the first item starting with that character will be at the bottom of the screen. 2. Use the arrow at the very bottom of the list to scroll down and the arrow at the top to scroll up.
Set it to create the filename using text and the T-JobNumber or T-DocNumber template variable created earlier.
Switch to the "Icon" tab and select a file extension from your machine to choose an icon to use for the template.
Switch to the "Users and Groups" tab and check all the groups you want to have access to the template. *** In general I NEVER give permissions on a user basis as that would cause a huge amount of work.
You can now text it by right clicking in the white space of Windows Explorer in the vault folders and select it from the menu.
This will bring up the Template Card and then create the Word Document from there.
Hope this is helpful to someone. I got all the information from various locations over the years, so you can probably search and find more info if you have questions.