referencing specific cells in a Word Table

S

skrimpy

I'm trying to write macro that will search a report for specifi
conditions so that I can manipulate the report without having to edi
it manually. My problem is that the report itself is automaticall
generated by another program and is generated such that the repor
itself is a table that stretches from page to page. I specificall
need to be able to reference the 1st, 2nd, and 3rd columns, and th
first and last cell in each page(the first and last rows on each pag
could be in the middle of the table). Is there a way to referenc
these cells in the middle of a table but happen to begin and end o
specific pages?
Thanks
 
D

Doug Robbins - Word MVP

Try making use of :

Selection.Information (wdFirstCharacterLineNumber)

to check if it's the first line on the page, and

If
Selection.InRange(Selection.Bookmarks("\page").Range.Paragaphs(Selection.Bookmarks("\page").Range.Paragraphs.Count))
= True Then
etc.

to check if you're in the last paragraph on the page. Probably need to move
the selection or set a range to the collapsed range of the last cell in the
row to make use of the latter.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top