Dim
targetrange
As
Range
Dim
Path
As
String
Path = "C:\blabla\Word\Bausteindateien\"
Dim
CompleteFile
As
String
CompleteFile = Path & Bausteindatei
If
Application.Documents(actDoc).Bookmarks.Exists(
"Text"
) =
False
Then
ActiveDocument.Bookmarks.Add name:=
"Text"
End
If
Set
targetrange = Application.Documents(actDoc).Bookmarks(
"Text"
).Range
Application.Documents.Open CompleteFile, Visible:=
True
Application.Templates(1).BuildingBlockEntries(Baustein).Insert Where:=targetrange
Application.Documents(Bausteindatei).Close (Word.WdSaveOptions.wdDoNotSaveChanges)
ActiveDocument.Bookmarks.Add name:=
"Text"