LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I insert a .jpg picture into word using LabView 6.02

I have created a series of jpg files durring the course of my vi.
I now want to programaticly insert them into a Word Document.
0 Kudos
Message 1 of 4
(3,916 Views)
Kandrew,
You can accomplish this by using MS Word as Active-X server. It would be much easier if you have Report generation toolkit for MS Office. You would use Append Image to Report.vi from the toolkit.
If you don't have the toolkit, you would use the InlineShapes.AddPicture activex method.
The attached VI is an example of using this method once you already get a reference to InlineShape object.
Zvezdana S.
Message 2 of 4
(3,916 Views)
Zvezdana S.;
Thankyou for the help this looks like what I need.
? How do you determine the "START" and "END" values?
0 Kudos
Message 3 of 4
(3,916 Views)
Kandrew,
Start and End are the starting and ending character position. They are optional inputs, and I believe if you don't wire them the picture will be added to the end of the document.
To ensure that it is attached to the end, you can use the Range.End property, and then use another Document.Range method. End-1 will be the Start point.
Another idea is to paste picture at a bookmark. You would use Document.Bookmarks property to get a reference to Bookmarks object. Then wire bookmark name to Bookmarks.Index method. Wire Item reference output of this method to Bookmark.End property. This End output number wire to both Start and End inputs of another Document.Range method.
Zvezdana S.
0 Kudos
Message 4 of 4
(3,916 Views)