06-10-2014 02:00 PM
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
Solved! Go to Solution.
06-12-2014 06:41 AM
Good Morning
In LabVIEW 2012 you do have the option to create webbrowser2 ActiveX object as well as a Word Document object.
Is this what you are looking for?
-ConnorM
06-12-2014 02:18 PM - edited 06-12-2014 02:18 PM
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!
06-16-2014 07:06 AM
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
06-16-2014 12:14 PM
Read only.
06-18-2014 07:41 AM
If you need the text from multiple pages, I found this workaround.
ConnorM
06-18-2014 07:55 AM - edited 06-18-2014 07:59 AM
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.
06-18-2014 09:37 AM
I have given in to the following solution although Microsoft suggests there is another way, I can't seem to make it work. ()