Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Import Formatted Text From Word Document

Problem

You cannot copy text with formatting from MS Word into a LabVIEW free label.  See this suggestion.

This VI uses ActiveX to get the text from the active Word Document and then copies the explicit formatting applied to the text into a LabVIEW string indicator so it can be copied to a free label.  It does not work with Word Styles/Themes.  This works well for colour-coded text code from an editor such as Notepad++ using the export plugin NppExport "Copy RTF to Clipboard" pasted into Word. It does run very slowly because it copies the formatting character by character, so takes several minutes for multi-page documents, but it is really just intended for code snippets. I don't know of a quicker way to copy the formatting from Word.

Input Word Document:

Active-Word-Document-Formatted-Content-Input-Word-Doc.png

LabVIEW Code (LabVIEW 2014 SP1):

Active Word Document Formatted Content.png

Output:

Active-Word-Document-Formatted-Content-Output-LabVIEW-String.png


Contributors