Tabel find and grab cell content

V

Vsn

Hi all,

Could any one give me a direction to to the following with some VB code:-

- Select firts table in word document
- Move to row 5 collumn 4
- Put the value of that complete cell in to a variable (stgValue)
- Print (Insert) the value of this variable (copied of the table) 2 times at
the end of the document.

Any help would be highly appriciated.

Thx,
Ludovic
 
J

Jezebel

stgValue = doc.tables(1).cell(5,4).Range.text
doc.content.insertafter stgValue & stgValue

However, I suspect you don't really mean the 'complete cell' - you might
want to trim the rightmost character, to discard the end-of-cell marker.
 
V

Vsn

Thx, this helps me further. I will use trim(stgValue) to clean the value
from spaces etc.

Can you tell me is there also a methode the find the last row in a table?

Ludovic
 
V

Vsn

Thx a lot. I just start messing with word and are not familiar with all its
particular methods etc.

Ludovic
 
J

Jezebel

You might find reading Help or using the Object Browser quicker than posting
questions to the forum.
 

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