![]() |
#2
|
||||
|
||||
![]()
You can read from / write to the table as follows:
Code:
Sub Demo() Dim Rng As Range, BkMk as String BkMk = "Document_Revision_Table" With ActiveDocument If .Bookmarks.Exists(BkMk) Then If .Bookmarks(BkMk).Range.Tables.Count > 0 Then With .Bookmarks(BkMk).Range.Tables(1) 'do something, eg: .Cell(1, 1).Range.Text = "Gothca!" Set Rng = .Cell(1, 1).Range Rng.End = Rng.End - 1 MsgBox Rng.Text End With Else MsgBox "Missing table" End If Else MsgBox "Missing bookmark: " & BkMk End If End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 03-05-2012 at 04:03 PM. Reason: Code fix & enhancement |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
acheo | Word | 1 | 11-24-2011 05:24 PM |
Error: The file may be corrupted, located on a server that is not responding, or read | naeemeh | Excel | 2 | 11-20-2011 03:38 AM |
![]() |
rockwellsba | Word VBA | 2 | 05-31-2011 01:07 AM |
Bookmark Classification | DrDoom | Word | 0 | 06-29-2010 07:08 AM |
Bookmark to another document | spqr | Word | 3 | 06-26-2009 04:51 AM |