Sub
schalter()
Dim
neu2
Selection.TypeText Text:=
"ich bin ein Schalte vom Type inlineshape"
Selection.TypeParagraph
Set
neu2 = ActiveDocument.Content.InlineShapes.AddOLEControl(ClassType:=
"Forms.CommandButton.1"
, Range:=ActiveDocument.Paragraphs.Last.Range)
neu2.OLEFormat.
Object
.Caption =
"Click Here2"
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.TypeText Text:=
"ich bin ein Schalter vom Type field"
Selection.TypeParagraph
ActiveWindow.View.ShowFieldCodes =
Not
ActiveWindow.View.ShowFieldCodes
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, PreserveFormatting:=
False
Selection.Range.Text =
"MACROBUTTON neu Dopelt anklicken"
Selection.TypeBackspace
Selection.Fields.Update
ActiveDocument.Fields(2).
Select
Selection.Range.HighlightColorIndex = wdRed
End
Sub
Sub
neu()
MsgBox
"Ich bin ein Field"
End
Sub