Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Wed, 19 Mar 2008 18:02:01 -0700,    group: microsoft.public.word.vba.beginners        back       


Finding a table in the document   
I need help in finding a specific table in a document. This table in one 
document could be the 10th table while in another document it could be the 
8th table. This specific table has user enter data that is used in 
calculations that are placed in different cells in the same table.Would a 
bookmark be the easiest to find and if so what is the code to find this.

Thanks,
SoNew2This
date: Wed, 19 Mar 2008 18:02:01 -0700   author:   SoNew2This

Re: Finding a table in the document   
Yes, you can select a table and insert a bookmark, then use

Dim mytable As Table
Set mytable = ActiveDocument.Bookmarks("Mytable").Range.Tables(1)

to create a reference (mytable) to the table by which you can refer to it in 
your code.
-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"SoNew2This"  wrote in message 
news:45D4BFCD-43A0-4136-A6ED-2411AA730E94@microsoft.com...
>I need help in finding a specific table in a document. This table in one
> document could be the 10th table while in another document it could be the
> 8th table. This specific table has user enter data that is used in
> calculations that are placed in different cells in the same table.Would a
> bookmark be the easiest to find and if so what is the code to find this.
>
> Thanks,
> SoNew2This
date: Thu, 20 Mar 2008 12:53:54 +1000   author:   Doug Robbins - Word MVP

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us