LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word_Update_Table.vi

How do I change the paste in the NI vi to Paste Special. I need to paste unformated text into a Word Table in order not to mess up my templete.
0 Kudos
Message 1 of 8
(2,955 Views)
I think what you really want is to change the node to "PasteAndFormat" instead of "PasteSpecial".

You then create a constant on the Type terminal and select "wdFormatPlainText". I've shown this in the attached image.

Be sure to Save this modified with a different name. If you do not, all the Report Generation VIs that use this VI will not work proerly any more.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 8
(2,955 Views)
I do not have PasteAndFormat. I only have PasteFormat but I can not add additional properties like you did. See attached jpg.
I am using Labview 7.1

Thank you for your help
0 Kudos
Message 3 of 8
(2,955 Views)
I also have LabVIEW 7.1, but when using ActiveX, the exposed properties depend on what version of the attached application is. I have Word 2002 with Service Pack 2 installed.

If you have a different version of word, or even a different updates installed on the seame version, there could be differences.

Unfortuately, since we seem to have different versions of Word, I'm not sure how it would work for you. If you have Word 2002, but don't have Service Pack 2 installed, try installing that and see if you get the PasteandFormat property.

Looking at your image, the obvious choice is PasteSpecial, but if yours is the same as mine, it doesn't seem to do the same as Paste Special in Word. No way to specify what format you want to paste.


Let me know hat version of Word you have and we might be able to figure it out looking through MS MSDN site.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 8
(2,955 Views)
OK, try this.

Select the PasteSpecial proerty and drop a string constant and enter 'wdPasteText' without the quotes. Connect this to the 'DataType' terminal and see if that works for you.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 5 of 8
(2,955 Views)
I installed Word XP and then had the PasteAndFormat. I did the change but for some reason the data that gets transferred to Word overrights the formating. I have attached a very small VI & a word file. When it is ran the data in the CW & CWW columns should be centered and in Blue.

I do not understand why the formating is over written.

Thank you for all you help.
Paul
Download All
0 Kudos
Message 6 of 8
(2,955 Views)
So far, I've been getting the same results you are getting. I've tried several different methods and nothing seems to work, it always removes the table formatting.

PasteSpecial ActiveX Method

The link above is to the definition of the PasteSpecial Method on MSDN. Maybe somebody a bit more versed in ActiveX can figure it out. I'll keep looking and let you know I come up with anything.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 7 of 8
(2,955 Views)
Hello again,

I've thought about this problem a lot over the weekend, and unfortunately, I'm stumped.

I almost have a feeling that the problem is more in the way that the table is selected before the pasting is done, than the paste operation itself. But I�m just not sure. It seems like it should work using the �PasteSpecial� method with a 'wdPasteText' string constant on the �DataType� terminal.

You might try reposting your question so others will see it as a new question and maybe somebody will know what to do.

Sorry I couldn�t help and good luck.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 8 of 8
(2,955 Views)