LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting a Word Table

Hi,
i'm using LabWindows 7.0.
I've a Word Document that's a template of a Test Data Report. In this template i've a header text and a preformatted table with a predefined number of rows.
So, to fill the Header i've used the WordReport.fp to select the bookmarks and write the text.
 
For the table i've the following question: in the WordReport there's the WordRpt_SelectTable () function that needs the table handle.
My problem is that i don't know the table_handle because the application don't create a new table, so i need to get the table handle directly inside the document:
 
Maybe i must open the document using directly the WordActiveX instead of using the WordReport wrapper library?
If yes, once open the document how is possible to get a specified item table?
Someone can help me with some examples both for WordReport and/or ActiveX?
 
Thanks to everyone...
 
Best Regards.
Maurizio
0 Kudos
Message 1 of 3
(3,210 Views)
Nobody has some suggestion??
 
Smiley Sad
 
Thanks....
0 Kudos
Message 2 of 3
(3,193 Views)
Hello,
 
Perhaps it will help solve a problem.
 
...  
CAObjHandle   tablesHandleL;
CAObjHandle   tablesHandle; 
int  i;
//====== Get handle of the tables list of the Word Document =======
Word_GetProperty (docHandle, NULL, Word_DocumentTables,CAVT_OBJHANDLE, &tablesHandleL);
//====== Get current (from index i) table handle ==================
Word_TablesItem (tablesHandleL, NULL,  i, &tableHandle); 
...
 
Best regards,
 
Janusz
0 Kudos
Message 3 of 3
(3,163 Views)