LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to launch word document after build

Hello,

 

We are having an issue where we have an application which opens up a Microsoft Word document on a server once a button is pressed.  This works fine while in the development mode but on the same PC as soon as the EXE is built the document does not open.  We are currently using 32 bit Labview 2017, we have tested on a 32 bit Windows machine with 32 bit Office 365 as well as Office 2010 and the result is the same.  

 

Is there something obvious we may be missing?

 

Thank you very much

0 Kudos
Message 1 of 6
(1,132 Views)

Please post your code. Your description does not give us any clue.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(1,123 Views)

What are the network permissions of the application?

0 Kudos
Message 3 of 6
(1,117 Views)

Hello,

Here is a screenshot of the code.  We have an open document VI set as a word document with the path.  It opens fine before it is built but as soon as it is built the word document is no longer launched.  We have tried the paths:

S\Path (Its a network drive)

\\servername\Path

 

as well as testing it out locally C:\Path

 

Thank you very much 

 

0 Kudos
Message 4 of 6
(1,075 Views)

@rickirvine wrote:

as well as testing it out locally C:\Path


So does the local path (C:/Path) work or not? You need to make the problem description really clear to avoid misunderstandings. It is not sufficient to know what you tested, you also need to give the results of the tests! 😉

 


@rickirvine wrote:

Here is a screenshot of the code.  We have an open document VI set as a word document with the path.  It opens fine before it is built but as soon as it is built the word document is no longer launched.  We have tried the paths:

S\Path (Its a network drive)

\\servername\Path


So this network location seems to be a mapped drive and it is located at S:\<path>, i.e. none of the alternatives you spell out above. The path datatype is OS independent (i.e. the delimiters and path syntax of the local OS is substituted automatically) but it is typically a really bad idea to do string operations on paths after converting them to string and back. The correct way is exclusively strip path and build path. Much more robust!

 

The first things you should do is create some indicators to verify the created paths under both environments.

Do you handle errors? Do any errors occur? Again, what are the network permissions? What is your LabVIEW version? Do you include all necessary dependencies when building the exe?

 

We cannot really debug truncated pictures (too many things are not visible), but the code looks a bit shoddy (unnecessary sequence structures, wires going in all directions, duplication of long roots parts of paths (up to TrackerAttachments). It typically helps to attach an actual VI.

 

0 Kudos
Message 5 of 6
(1,062 Views)

You also need to make sure that the Word class of the report generation tool kit is included in your build. 

This is one of the biggest problems with the ReportGeneration Toll kit. 

Message 6 of 6
(1,057 Views)