From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-17-2016 03:19 PM
Hey everyone,
Does anyone know of a way to add a caption to a word image using the report generation toolbox for office? I got as far as adding a line of text before but I'm looking to instead add it as a caption underneath.
Thanks in advance,
Anthony
Solved! Go to Solution.
10-17-2016 04:13 PM - edited 10-17-2016 04:17 PM
Something like this will work for you. Make sure that whatever text you put in the Label field is already added to the collection in Word, otherwise it will error out. Word maintains a collection of these labels, which can be accessed programmatically using the Applications object and selecting the CaptionLabels property.
EDIT: updated image to show CaptionLabels property.
10-17-2016 04:40 PM
I spent most of my morning messing with ActiveX and was just not getting it. Thank you so much for this solution!
10-17-2016 05:12 PM
I've implemented the procedure which was given in here but was given an Error 1 to go onto it.
"Possible reason(s):
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488: Command requires GPIB Controller to be Controller-In-Charge."
This error occurs for me in the "Save Report to File" VI.
Does anybody have any advice on this? I've taken apart most of my VI to find if it's something else but for sure it's something in this section. I've tried different report names and moving the report in / error in on the Save File vi but nothing seems to be helping.
I've included an image with this for testing - it should take the image and plug it into a new report with the caption when run.
10-18-2016 09:01 AM
Can you post a snippet of the code? I am still using LV2012 unfortunately.
That error typically has something to do with file access, permissions, or maybe invalid save path.
10-18-2016 09:29 AM - edited 10-18-2016 09:29 AM
@AnthonyMN wrote:I've implemented the procedure which was given in here but was given an Error 1 to go onto it.
"Possible reason(s):
@Labview: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or
=========================
NI-488: Command requires GPIB Controller to be Controller-In-Charge."
This error occurs for me in the "Save Report to File" VI.
Does anybody have any advice on this? I've taken apart most of my VI to find if it's something else but for sure it's something in this section. I've tried different report names and moving the report in / error in on the Save File vi but nothing seems to be helping.
I've included an image with this for testing - it should take the image and plug it into a new report with the caption when run.
You are closing references to the document and application before saving the file. Do that after your save.