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, 11 Jun 2008 02:36:00 -0700,    group: microsoft.public.word.tables        back       


Updating contents of a Word table   
Hi,

Ho do I update the contens of a Word table? The Table type does not have an 
Update() method.

TIA,
JY
date: Wed, 11 Jun 2008 02:36:00 -0700   author:   JY

Re: Updating contents of a Word table   
Is this a table of contents, a table of figures, or an "ordinary" table that
contains formula fields? Generally, from the user interface you can update
fields by selecting them and pressing F9.

If you want a macro, you can use the following to update all fields in the
body of the document:

Sub UpdateFieldsInMainDoc()
    Dim t As TableOfContents
    Dim f As TableOfFigures
    Dim g As Field

    For Each t In ActiveDocument.TablesOfContents
        t.Update
    Next t

    For Each f In ActiveDocument.TablesOfFigures
        f.Update
    Next f

    For Each g In ActiveDocument.Fields
        g.Update
    Next g

End Sub

-- 
Stefan Blom
Microsoft Word MVP


"JY"  wrote in message
news:90A4F0C2-C474-454F-B1F1-7EBA1E629006@microsoft.com...
> Hi,
>
> Ho do I update the contens of a Word table? The Table type does not have
> an
> Update() method.
>
> TIA,
> JY
date: Wed, 11 Jun 2008 11:58:17 +0200   author:   Stefan Blom

Google
 
Web ureader.com


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