Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Finding a table in a word doc.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 30 Jan 2007 18:47 GMT
I am currently tring to find a table in a word doc using execl automation.  I
can not find the first table.  
Signature

Thanks
Jason

Perry - 30 Jan 2007 18:57 GMT
?
dim tbl as word.table
set tbl = wdapp.activedocument.tables(1)

If the activedocument has a table (or more), above lines
will give you a pointer to the first table.
(provided wdapp is a valid object variable pointing to the word instance
y've instantiated in yr Excel code)

Krgrds,
Perry

>I am currently tring to find a table in a word doc using execl automation.
>I
> can not find the first table.
Jason - 30 Jan 2007 19:21 GMT
thanks, Is there a easier way to skip a row and copy the next one and paste
it on another doc.
Signature

Thanks
Jason

> ?
> dim tbl as word.table
[quoted text clipped - 11 lines]
> >I
> > can not find the first table.
Perry - 30 Jan 2007 20:18 GMT
Sure but

Skip a row?
Under which circumstances?
Or just skip a row?
Meaning get data from second row?

If the latter, something like below code will do

Dim tbl as word.table
dim cel as word.cell
Set tbl = wdapp.activedocument.tables(1)
for each cel in tbl.rows(2).cells
Debug.print cel.range
next

Krgrds,
perry

> thanks, Is there a easier way to skip a row and copy the next one and
> paste
[quoted text clipped - 16 lines]
>> >I
>> > can not find the first table.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.