Sub
Testmakro()
ActiveDocument.Unprotect (
"passwort"
)
Dim
Text1
As
String
Dim
Text2
As
String
Dim
Text_neu
As
String
Application.ScreenUpdating =
False
Text1 = ActiveDocument.Bookmarks(
"Textmarke_1"
).Range.Text
Text2 = ActiveDocument.Bookmarks(
"Textmarke_3"
).Range.Text
Text_neu = Text1 &
" "
& Text2
If
Word.ActiveDocument.Bookmarks.Exists(
"Textmarke_neu"
)
Then
Word.Selection.
GoTo
What:=wdGoToBookmark, Name:=
"Textmarke_neu"
Word.Selection.TypeText Text:=Text_neu
End
If
Selection.
GoTo
wdGoToPage, wdGoToAbsolute, 1
Selection.Bookmarks(
"\Page"
).Range.Delete
Application.ScreenUpdating =
True
Application.DisplayAlerts =
False
ActiveDocument.SaveAs FileName:=ActiveDocument.Path &
"\Dateiname.docx"
Application.DisplayAlerts =
True
End
Sub