LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to View Word 2013 Document in ActiveX Object

Solved!
Go to solution

I know that the old method of viewing Word docs was to use a webbrowser object.  This doesn't work now since the document opens in word instead.  MS has a workaround, but suggests not to use it for new projects(it involves changing the registry and I'llbe distributing this app to other machines so this isn't an option).  I'd like to know if why webbrowser2 doesn't show up as a usuable ActiveX object in LabVIEW 2012 and if anyone knows how to use the Word document object so you can scroll and navigate a word document.

 

Thanks

0 Kudos
Message 1 of 8
(4,613 Views)

Good Morning

 

In LabVIEW 2012 you do have the option to create webbrowser2 ActiveX object as well as a Word Document object.

 

WebScreenShot.PNG

ActiveXSelect.PNG

Is this what you are looking for?

 

-ConnorM

Message 2 of 8
(4,563 Views)

No, if you put a word doc into a document object, you cannot navigate around inside it, e.g. if it is larger than the object due to multiple pages.  Also, the webrowser navigate method opens in Word.exe not in the container. The image below shows the problem. Please see the following web sites for more info on this issue. MS has a work around, but it is not acceptable and they don't recommend it.

 

http://support.microsoft.com/kb/304643 -"Considerations when you use the WebBrowser control together with a 2007 Microsoft Office program"

http://msdn.microsoft.com/en-us/library/aa768360(v=vs.85).aspx  i've tried setting the flag to zero and another number I found on another site which I can't find right now but the value was likely 0x800024.

http://support.microsoft.com/kb/927009

 

Thanks!

webbrowsererror.PNG

 

 

0 Kudos
Message 3 of 8
(4,547 Views)

 That is troublesome. You might want to try creating your own scroll bar using property and invoke nodes, but that is just trying to make the document object work. What is the goal of the application? Is it read only or are you trying to edit the document at well?

 

ConnorM

0 Kudos
Message 4 of 8
(4,504 Views)

Read only.

0 Kudos
Message 5 of 8
(4,493 Views)

If you need the text from multiple pages, I found this workaround. 

GrabTextFromDoc.png

 

ConnorM

0 Kudos
Message 6 of 8
(4,457 Views)

Thanks, But that doesn't help when there are figures(pics) in document. As A workaround, for now, I have switched to rtf files.  The attachment shows what I was trying to achieve except I had to save the word document as a rtf document and load it into a rich text document container (found under .NET & ActiveX).  This preserves formatting and pcitures whereas the method above does not.  I still think this is not optimal as in older versions of MS Office, this was done easily as shown in the Diagram Disable Structure.

 

Thanks.

 

Rich Text Box

Download All
0 Kudos
Message 7 of 8
(4,449 Views)
Solution
Accepted by topic author VISluth

I have given in to the following solution although Microsoft suggests there is another way, I can't seem to make it work. ()

 

http://support.microsoft.com/kb/982995

0 Kudos
Message 8 of 8
(4,437 Views)