Dim
Zelle
Dim
ZelleNr
ZelleNr = 2
For
Each
value
In
events
Zelle = ActiveDocument.Tables(1).Cell(ZelleNr, 1)
If
StrComp(Zelle, value, 1) = 1
Then
mycomp = StrComp(Zelle, value, 1)
Debug.Print mycomp
myValue =
"Public Function "
& events(counter) & vbCrLf & vbCrLf & vbCrLf &
"End Function"
counter = counter + 1
BookmarkNumber = BookmarkNumber + 1
Bookmark =
"Text"
& BookmarkNumber &
""
ActiveDocument.Bookmarks(Bookmark).
Select
Selection.Text = myValue
newBookmarkNumber = newBookmarkNumber + 1
newBookmark =
"Text"
& newBookmarkNumber &
""
With
ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:=newBookmark
.DefaultSorting = wdSortByName
.ShowHidden =
False
End
With
Else
MsgBox
"Da hat etwas nicht funktioniert"
End
If
Next