Reading Tables in MS WORD using LabView & ActiveX

I would like to be able to read tables contained in an MS WORD document using LabView and ActiveX. (I've been successful in doing this with Excel files.  ( I am not using the report generation toolkit.)  After searching numerous posts with similar questions about LV & ActiveX  I've not found any solution to my specific app.  In LabView I'm successful doing an "Automation Open", followed by a Property Node, to an Invoke Node ("Documents" Open) and then a Property Node with "TABLES" selected. That's where I get stuck. Now that I have a reference (?) to "Tables" I can't seem to figure out what I need to connect and follow that with in order to now read the Tables in my document.  I guess that's due to my lack of understanding as to what exactly this "Table" property node output actually is.  Can someone tell me what this reference output is referring to and how I can get to the Tables within the document from it?  I've tried connecting both a property node and invoke node to no avail.  Can someone point me in the right direction?
Thanks. Ed

Dear Ed,
Figuring out "what I need to connect and follow that with" relates to the organization of the MS Word Object Model.  Please refer to the Word Object Model Reference MSDN >> MSDN Library >> Office Development >> 2007 Microsoft Office System >> Word 2007 >> Word 2007 Developer Reference >> Word Object Model Reference.  You can think of the Object Model as a software hierarchy.  You must start at the top of the hierarchy and work your way down to the item of interest.  You must descend the hierarchy one level at a time; you cannot skip levels.
At each level of the hierarchy, you have access to the methods and properties of that "level".
Click on the Tables Collection link from the Word Object Model Reference page.  Notice how Tables is at the top of the hierarchy.  When you have a LabVIEW reference to a Tables object (technically speaking a collection), you then have access to the methods and properties supported by this "level".  Click on the Tables Object Members link.  Here you will see that the Tables collection supports two methods, Add and Item, and also supports five properties, Application, Count, Creator, NestingLevel, and Parent.
Notice how Mike gets the Count property of the Tables object.  He then uses the Item method to return a reference to an individual table.  The key thing to take away from this is how Mike uses the Item output node to gain access to the methods and properties of the Table object (not the Tables collection).  Mike has descended the hierarchy from Tables to Table.  He descends the hierarchy again with the Cell method and Range property of the Table and Cell object respectively.  Lastly, the Text property of the Range object, "Returns or sets the text in the specified range or selection."
Effective LabVIEW programming with this type of ActiveX control requires a fair understanding of how Microsoft organized its software libraries.  The Object Model Reference is a good place to start visualizing how these libraries are organized.  Thank you for using the forums Ed, and thanks for your post, Mike.

Similar Messages

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • Help!!! Can Anybody tell me how to read bookmarks of MS word using ABAP?

    It took me around 3 days , but there is still no solutions...
    Can Anybody tell me how to read bookmarks of MS word using ABAP ?
    Many thanks.

    Dear Nick  ,
    Thanks for your attention!
    I have MS word installed in the R3 server , and I uploaded my word doc with some self-defined bookmarks into SAP R3 system.
    Now I want to read these bookmarks using ABAP in this R3 system...
    Is it clear enough?
    Looking forward to your solution ...
    Thanks again..
    Best Regards,
    Leon.

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • Download alv-table to MS-Word using OLE2

    Hello,
    I need to download an internal table like ALV to MS-Word using OLE2.
    thank you 4 ur help.
    I fund this Report, but here i just can write a text in word but I can not show/write a Table.
    http://wiki.sdn.sap.com/wiki/display/Snippets/SampleprogramtocreateaWorddocumentfromABAP%28usingOLE%29
    CALL METHOD OF v_objselection 'TypeText'
      EXPORTING #1 = 'Olé World!'.
    when i wrote a table 4 Exmpel lt_outab insteat of 'Ole World' I got a trouble during compling because lt_outab is not a CHAR:-(

    I recommend reading this article:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204d1bb8-489d-2910-d0b5-cdddb3227820
    You will get all the information you need to do with OLE2 Automation.
    It is also useful to dig into VB a little bit.
    In the article on page 7 you have a sample code which shows how to do with tables. You need to loop in ABAP on the internal table and inside this loop you need to loop on fields. Use VB methods ADD and CELL.
    FIELD-SYMBOLS: <wrk> LIKE LINE OF itab, <field> TYPE ANY.
    CALL METHOD OF word 'Add' = table
      EXPORTING
        #1 = range_table
        #2 = lines                            "lines( itab )
        #3 = fields.                          "number of fields
    LOOP AT itab ASSIGNING <wrk>.
      l_index = sy-tabix.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE <wrk> TO <field>.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        CALL METHOD OF word 'Cell' = cell
          EXPORTING
            #1 = l_index
            #2 = sy-index.
        GET PROPERTY OF cell 'Range' = range
        SET PROPERTY OF range 'Text' = <field>.
      ENDDO.
    ENDLOOP.
    Regards
    Edited by: Krzysztof Usowicz on Sep 15, 2010 9:45 AM

  • Starting applications remotely using LabView activeX server

    I want to
    make a program that enables me to start applications on a remote computer. I
    made a program that starts applications using either System exec.vi or .NET and
    both methods work find on my local computer. I built it with activeX server
    enabled and copied it to my remote computer. After struggling with DCOM
    settings and Security settings for a couple of days!! I’m now able to start the
    program from my local computer. The thing is that I can’t see either the
    LabView program or the started application. When opening the Windows Task
    Manager, I can see both the programs under the Process tab so they have
    started, but obviously as a “background” process and not as an application.
    Does anyone
    have an idea on how to start the programs as applications?

    Why not just use PsExec?
    http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

  • How to read data over tcp/ip using labview

    Hi,
    I have a network enabled force transducer (6-axis load cell). I know its IP addr. and the data format it is sending the data out (7 32-bit DWORD, One status and 6 axis force data) . I have been playing around with the simple data client.vi example program. 
    When I executed the program using the devices IP addr. I used to get error 63: TCP/IP connection open. Then I ran the program using localhost in IP addr field, the program executes now indefinetly at one block only. I am attaching the screenshot for ref. 
    Thanks.
    Sasi.
    Attachments:
    TCP-IP.JPG ‏62 KB

    Hello,
    I'm wondering if you can create a rather simple VI that just tries to open and close a TCP connecting to your transducer. All you would need is a TCP Open and a TCP Close wired together with the proper IP address etc. Does this run? I did look to see if there was any NetFT information and I could not find anything. I feel that the problem lies in the communication protocol between your transducer. Another place to see if you can connect to it would be to try hyperterminal. You can access this in Windows XP by clicking Start»All Programs»Accessories»Communications»HypeTermina. Using this, you can try and connect to your instrument with TCP/IP outside of LabVIEW. You might also want to get in contact with the manufacturer to verify that third-party software can indeed communicate with it. There may be a specific set of instructions that need to be sent to the transducer in order to initiate the connection and then read from it. These may be in the form of serial commands that would need to be sent over TCP. What is the make and model of your transducer?
    -Zach
    Certified LabVIEW Developer

  • Reading table: /SAPAPO/AM_ALERT or using FM: /SAPAPO/AMPLLP_SDP_ALERTS

    Hello all,
    I am trying to build a logic that retrieves the database alerts from the table: /SAPAPO/AM_ALERT.
    Problem is the mapping of the OBJECT ID's on this table where I encounter some for which I cannot find a correspondence.
    Currently I have the following:
    OBJECT ID1 = Macro Book
    OBJECT ID2 = Data view
    OBJECT ID3 = ???
    OBJECT ID4 = ???
    OBJECT ID5 = ???
    OBJECT ID6 = ???
    This fields have a content with some ID. I have tried to check either this ID's are the material ID from /SAPAPO/MATKEY or the location from /SAPAPO/LOC but there is no findings.
    Does anyone know the correct mapping and how to properly read the table?
    This is because I would need to filter the database alerts retrieved from this table by product/location...
    As an alternative does anyone know about how to correctly populate the import parameters of FM: /SAPAPO/AMPLLP_SDP_ALERTS?
    I believe this would also be an option to read the database alerts.
    Thank you all.
    Joao

    AAL,
    I have never tried to delete alerts under the condition where there are several million entries, so I cannot speak from memory.  I had a similar problem once with BackOrder Processing logs, which caused me all kinds of grief to reorg....
    If you have an old version of APO (3.1 and previous) there are some notes that may be helpful.  Search on OSS under /SAPAPO/AMON_REORG.  Particularly http://service.sap.com/sap/support/notes/513553.  These problems have mostly been corrected in later versions.
    As far as your question,  the two 'times' you asked about refer to the record creation date.  Records that are older than the absolute date/time will be deleted.  Relative Date time refer to 'difference from today'.  I would start with a very old value under 'absolute', say around the date that your first alerts were created.  To avoid session timeout issues, I would create a variant which selected only the oldest records, and then run in background.  I would try first to select only one alert monitor application, preferably one that has the smallest number of records, to start.  Once these are fully reorg'ed, move to another A/M application.
    For internal table storage, there are settings that your Basis Team can make, that may improve the situation.  Print the error log and take it to your Basis team.
    Best Regards,
    DB49

  • "how to read parallel port using labview"

    "i am doing a bio medical project and need to read data from parallel port using labview. can anyone help me"

    Hi
    in most cases a simple example helps best.......see attachment. Find in addition in Word document a helpful picture of LPT - Pins.
    In case you work with WinNT, W2k, XP - you need to install accesshw.
    Regards
    Werner
    Attachments:
    printer_port_test.zip ‏41 KB
    dsub_25_parallel_port.doc ‏29 KB

  • Read image from excelsheet using labview

    i need to know how to read image from excel sheet using Labview...m not able to get the appropriate property to display the image stored in excel sheet.
    thank you

    you need to ask Microsoft to find out the property name/location under Microsoft Excel. 

  • Read   table and loop at

    Hi EXpert,
    I have an internal table say itab and I need to fetch a single record with some given conditions.
    Hence I have used READ table statement ,
    But on using this read table statement , I am unable to fetch the record :-(((( . It gives sy-subrc  =  4.
    And the same conditions when are put in Loop at itab  statement, then I am able to fetch the data .
    My requirement is only 1 record for the given conditions ( in where clause in case of loop at statement).
    I think I am probably missing out on some minor thing..
    <removed_by_moderator>
    Warm Regards,
    SUDHA
    Edited by: Julius Bussche on Feb 7, 2009 2:48 PM

    Hi,
    Test the following Code hope it will solve out your problem,
    PARAMETERS: key TYPE i .
    TYPES: BEGIN OF t_test,
      s_no TYPE i,
      name(15),
      END OF t_test.
    DATA: it_test TYPE STANDARD TABLE OF t_test WITH HEADER LINE.
    DO 10 TIMES.
      it_test-s_no = sy-index.
      it_test-name = 'SDN'.
      APPEND it_test TO it_test.
    ENDDO.
    READ TABLE it_test INTO it_test WITH KEY key.
    IF sy-subrc = 0.
      WRITE: 'sy-subrc = ' , sy-subrc,
             /1 it_test-s_no, 15 it_test-name.
    ELSE.
      WRITE: 'sy-subrc = ' , sy-subrc,
             / 'Sorry there is no Records with this Key'.
    ENDIF.
    Kind Regards,
    Faisal
    Edited by: Faisal Altaf on Feb 7, 2009 6:59 PM

  • How to create a table in MS Access from Labview using ActiveX?

    I want to transfer datas from Labview to Access using activeX method. My only problem is to find out how to create a new table (array) in Access from the Labview program.
    Remarks: I use Labview 6i and MS Access 2000.
    For the moment I can write and read datas of Access from Labview.
    If someone could help me... that would be grate!

    This is off the Microsoft MSDN site "creating an external table". I think you can drop the last step.:
    Open the database you want to create the table in. If it is the current database, use the CurrentDb function to return an object variable that represents the current database. If it isn�t the current database, use the OpenDatabase method to open the database you want.
    Use the CurrentDb function to create a Database object that points to the current database.
    Use the CreateTableDef method of the Database object to create a table definition for the Microsoft Access table.
    Use the CreateField method of the TableDef object to create one or more fields in the Microsoft Access table.
    Use the Append method of the Fields collection to add the new field or fields t
    o the Microsoft Access table.
    Use the Append method of the TableDefs collection to create the Microsoft Access table.
    Use the TransferDatabase method to create the external table in the specified folder.
    Use the Delete method of the TableDefs collection to delete the Microsoft Access table definition.

  • How to read a table from a word file, using HWPF

    How can I read a table from a Word file using HWPF?
    I looked in API and Table class doesn't seem to have a constructor... very very strange for me. pls help

    the constructor is HWPFDocument = new HWPFDocument(/*file*/)
    Here is the API for that
    http://poi.apache.org/apidocs/org/apache/poi/hwpf/HWPFDocument.html
    Also here is another link to something that might help you more with tables
    http://www.aspose.com/Community/forums/thread/79182.aspx

  • How to read the data in spectrum analyzer (Anritsu MS2661C) and put it in Excel using Labview

    Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
    I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
    I have got the instrument driver which can write and control the instrument using Labview 2010.
    and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
    Do I need to use other software or programming to do this step?
    If anyone know how is this done, please let me know.
    Regards,
    Ery

    Hi ery,
    In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit.  The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel.  I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.  
    Another way would be to use the Write To Spreadsheet File VI.  While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers.  I have also attached a link to some information on the Write To Spreadsheet VI below.  
    Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file.  From LabVIEW, you can go to Help»Find Examples to launch the Example Finder.  From there, you can search for "spreadsheet," which should populate examples for use in different applications.  I hope this helps, ery.  Please let me know if you have any further questions about these!
    NI LabVIEW Report Generation Toolkit for Microsoft Office
    Write To Spreadsheet File VI 
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • How to read and write data from Excel to TestStand without using LabVIEW VIs

    Hi,
    How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
    I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
    Thanks for your help.

    That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
    http://www.microsoft.com/en-us/download/details.aspx?id=16250
    http://support.microsoft.com/kb/141759
    http://support.microsoft.com/kb/302084
    CTA, CLA, MTFBWY

Maybe you are looking for

  • Where is the trial version of captivate 7?

    The Adobe pages give me an error whatever button I click to download the 30-day trial. Anybody has a link that is working?

  • Disabling Any connect in Cisco ASA's

    what is the best way to disable anyconnect in the Cisco ASA's. Thanks

  • Main window twice

    Hi. I have requirement to print main window twice. Please help me out. 1) In my script i make two main windows like MAIN 00, MAIN 01. 2) In MAIN 00 i have ELEMENT 525 and 525-n( i am created). This two available in MAIN 02 also. 3) In my Driver Progr

  • PING[ARCp]: Heartbeat failed to connect to standby 'psmartbk'

    My system run on Oracle 10g R2 Windows 32 bit; I've configure data guard with one primary "smartbk" and one physical standby "psmartbk" on the same PC; I get he following error on the primary database "PING[ARCp]: Heartbeat failed to connect to stand

  • Interactive Report: E-mail Template?

    All, Is there any way to edit the template used for e-mailed versions of interactive reports? Specifically, I'd like to change the line that says <base href="http:///" /> to point to our server, so that links in the report data continue to function.