- Please select -

Linking MS Word Document Properties to PDM Variables

Tips and Tricks Amgad Yacoub 10 February 2021

Linking MS Word Document Properties to PDM Variables

Most MS documents can be controlled and linked to Solidworks PDM, as per the following instructions.

  1. In PDM Administration Tools –> Variables node, define PDM variable (Description)
Selecting New Variable
  • Define PDM variable New Attribute (CustomProperty)
    • Define Block name (CustomProperty)
    • Define Attribute Name (Description)
    • Link to file extension (Doc, Docx,…etc.)
Linking to file extension
  • Link Variable to data Card
Linking Variable to data Card
  • DataCard should Support File extensions
Checking if it has Support File extensions

Let us test the result.

Create i.e., an MS word file in PDM and updated the DataCard field Description with a value (This Field Controlled by PDM)

Field Controlled by PDM

Open the MS word file go to file Info –> Properties.

Properties in MSWord

Select Advance Properties a Custom tab.

You should see all the DataCard values in the properties box.

  • But how to show this information in the document body?

Go to Insert Tab –> Quick Part –> Field.

Under the Insert Tab

From Filed name select DocProperty and then select Description from the right list

Field Settings

This Filed Controlled by PDM Modified

Save the file and close the file check it in check it out again modify the DataCard Variable (Description) value this Field Controlled by PDM Modified (this is the result after modifying the DataCard value 😊)

Modifying the DataCard Variable
  • For auto-update these values, copy and paste the following macro in the word document:

Go to the Developer tab –> Macros

Sub AutoOpen()

‘ AutoOpen Macro

Dim aStory As Range

Dim aField As Field

For Each aStory In ActiveDocument.StoryRanges

For Each aField In aStory.Fields

aField.Update

Next aField

Next aStory

End Sub

This should be it 😊.

Note: The best practise is to have a predefine word document templates stored in PDM Vault and use the PDM Templates functionality to create these word documents.

Checking Predefine Word Document Templates

By this, once you right-click in PDM Vault view –> Create a Project Checklist for example, and start filling this document’s DataCard values. The word document will be created with the Datacard information already in the document body as per the following example.

Selecting PDM Controlled Document

Hope that helps.

Amgad Yacoub
Senior Field Engineer
Central Innovation, Perth

At Central Innovation, we can provide all – or part – of the solution. Including SOLIDWORKSARCHICAD, and many more industry-leading tools.

It’s something we’ve been doing for almost 30 years. Our commitment to customer service is second to none: we help you get the best out of your technology.

For a truly unique solution to your unique challenges, please contact us. Or read about some of the great services and solutions we offer.

Sidebar Buttons

Back to Tips and Tricks