Hi all. In a Word document, I have a number of fields related to SW PDM. My problem is that during a transition to my " Approved " document some of these variables are changed, but the Word file is not saved with the fields up to date. And it seems impossible to update these fields on a read-only file (even for a view) when the latter is approved and therefore archived. Did I miss something? Is there a trick/macro to open > update fields → save during my flow transition?
If the fields are mapped, and unless I'm mistaken, they are updated in the properties of the Word file. The only difference, if these are parameterized fields, is that they have to be updated (Ctrl+A, F9). In our PDM, the Word frame has a macro that has the opening updates all the parameterized fields.
Hello Cyril, indeed the properties of my fields are well mapped and it works. An example of my problem: my file goes from a modification state to an approved state. The state appears on the document, so at the flow transition, I map this property. When I open this file (read-only, because it is approved and no extraction possible) the variables are OK (functional mapping) but the fields are not up to date. it's up to the user to do the update... and this is a source of errors.
I like the file solution with macro, because it would make me modify all my frames in " *.docm ", I would have preferred a task to be executed on the transition for example...
In any case, I still haven't found the solution for the moment.
@jerome_lamar Thank you for this link, I had already read this article, but my problem is not the mapping, but the updating of the fields.
To be tested with a dispatch script in this case that can be applied during a transition. Normally the file will need to be closed to make the transition.
Hello and thank you Cyril Indeed, I am also thinking about this solution, it would solve my problem. All that remains is to do or find this script... Unfortunately, I don't have the skills.
Hello Well, I haven't found a solution with the tools built into Solidworks PDM. Maybe a possibility with a macro in the normal.dotm of Word in which you can intercept actions in Word (when opening a file, updating fields). I can't test because I have a security software for my workstation that is blocking me at the moment.