PDA

View Full Version : Copying Bookmarks Including Tables



Bert
02-23-2011, 12:14 AM
Hi,

I have a setup that finds bookmarks in a master document and pulls them into client documents.

Some of theses bookmarks include tables, all is working well, its just that when the bookmark is copied over only the text comes, not the table.

Here is a sample of the code...

Meal:
Dim sRng As Object
Dim tRng As Object
With tRng
.Font.Name = "Times New Roman"
.Font.Size = "12"
.ParagraphFormat.LineSpacing = "Single"
End With
Dim SourceDoc As Document
Dim TargetDoc As Document
Set TargetDoc = ActiveDocument
Set SourceDoc = Documents.Open("C:\SOA Concept Registry.doc")
Set sRng = SourceDoc.Bookmarks("Meal").Range
Set tRng = TargetDoc.Bookmarks("Super").Range
tRng.Text = sRng
Documents("SOA Concept Registry.doc").Activate
ActiveDocument.Close

Any help would be much appreciated.

Bert
02-23-2011, 01:51 AM
Sorted.