![]() |
#2
|
||||
|
||||
![]()
Hi Matt,
If you're simply updating a bookmarked range, there is no need for the GoTo - simply address the range: Code:
Dim wrdApp As Word.Application Dim wrdDoc As Word.Document, WrdRng As Word.Range Dim i As Integer Set wrdApp = CreateObject("Word.Application") wrdApp.Visible = True Set wrdDoc = wrdApp.Documents.Open(directory) With wrdDoc If .Bookmarks.Exists("g") Then Set WrdRng = .Bookmarks("g").Range .Tables.Add Range:=WrdRng, NumRows:=2, NumColumns:=2 ' Reapply the bookmark to the table .Bookmarks.Add Name:="g", Range:=WrdRng End If End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can this be fix in excel or should I go to word | lostsoul62 | Excel | 1 | 04-18-2012 01:00 AM |
From Excel to Word? | lostsoul62 | Word | 1 | 03-19-2012 06:20 PM |
![]() |
Joe Patrick | Word VBA | 2 | 01-30-2012 07:23 AM |
![]() |
rynman | Office | 5 | 04-19-2009 06:50 AM |
![]() |
retrospect1984 | Excel | 1 | 02-18-2009 06:41 AM |