10-22-2015 09:30 AM
Hi everybody,
Is there a way to update all the fields as explained here (Update a cross-reference from one page to another)
https://support.office.com/en-us/article/Create-or-update-a-cross-reference-aa35c606-34e8-4c64-b6eb-...
in order to update cross-references linked to bookmarks in a word template before closing it while appending some texts and pictures ?
I struggle to find a solution.
Cheers,
Solved! Go to Solution.
10-22-2015 10:30 AM
Are you trying to do this thru Labview? Or is this a Word question? Bottom of the article says this applies to Word for Mac 2011. Does this apply to your use case?
10-22-2015 11:11 AM
I am trying to do this through Labview. Actually I am just looking for a way to update/refresh the entire word (fields, cross-reference etc) before closing it. I do not know if it feasible using a Active X command or something else....
10-22-2015 11:31 AM
Can you do this update routine in the software successfully (without Labview)? If so, record a macro of your actions and use the macro code to determine the ActiveX objects that are needed to do it externally.
10-22-2015 02:03 PM
Is it possible to do a Ctrl+A and F9 with Labview in a word ?
Or to do this Macro
1
2 3 4 5 6 7 8 9 10 11 12 13 14 |
Dim J As Integer Dim K As Integer If ActiveDocument.Sections.Count > 2 Then For J = 3 To ActiveDocument.Sections.Count For K = 1 To ActiveDocument.Sections(J).Headers.Count ActiveDocument.Sections(J).Headers(K).Range.Fields.Update Next K For K = 1 To ActiveDocument.Sections(J).Footers.Count ActiveDocument.Sections(J).Footers(K).Range.Fields.Update Next K Next J End If |
with ActiveX
Or to do a print preview of the word (with the option updates fields selected in the options of Word) and then add some modification before saving and closing the documents ???
I am new with Labview and I really do not know how to do this...
10-22-2015 02:13 PM
This is just a start. I don't have the For Loops from your macro but you can see how to get access to the necessary ActiveX objects.
10-22-2015 02:47 PM
Thank you very much and sorry again but in which library do you all this class ? I just manage to find Fields-Update....
10-22-2015 02:52 PM
I use the Report Generation toolkit as a jumping off point. There is a VI there (2nd in the picture) that returns ActiveX references. The picture I attached is a snippet. Drag it to your desktop and then onto a block diagram and if you have the Report toolkit, everything will be added automatically to your VI.
10-22-2015 02:59 PM
Wow, I didn't know anything about this snippet ^^. I will save a lot of time now ^^. Thank you.
10-22-2015 03:27 PM
If one of my responses sufficiently answers your question, please mark it as the solution so others that come along with a similar question can see how you solved it.