aussie_VA
01-25-2013, 12:44 PM
In a UserForm, I have code which inserts Building block if a checkbox is checked. However, only half the building block appears in the Word document. Any ideas? :banghead:
Dim T1 As String
If CheckBox1.Value = True Then
Selection.GoTo What:=wdGoToBookmark, Name:="bk1"
ActiveDocument.Bookmarks("bk1").Delete
Selection.InsertAfter ActiveDocument.AttachedTemplate.BuildingBlockEntries("T1")
ElseIf CheckBox1.Value = False Then
Selection.GoTo What:=wdGoToBookmark, Name:="bk1"
Selection.Delete Unit:=wdCharacter, Count:=1
ActiveDocument.Bookmarks("bk1").Delete
End If
Dim T1 As String
If CheckBox1.Value = True Then
Selection.GoTo What:=wdGoToBookmark, Name:="bk1"
ActiveDocument.Bookmarks("bk1").Delete
Selection.InsertAfter ActiveDocument.AttachedTemplate.BuildingBlockEntries("T1")
ElseIf CheckBox1.Value = False Then
Selection.GoTo What:=wdGoToBookmark, Name:="bk1"
Selection.Delete Unit:=wdCharacter, Count:=1
ActiveDocument.Bookmarks("bk1").Delete
End If