vbscript
Set objWord = CreateObject(“Word.Application”)
objWord.Visible = True
Dim objShape
Set objShape = objWord.ActiveDocument.Shapes.Add(msoShapeText, 100, 100)
objShape.TextFrame.TextRange.Font.Name = “Arial”
objShape.TextFrame.TextRange.Font.Size = 24
objShape.TextFrame.TextRange.Font.Bold = True
objShape.TextFrame.TextRange.Font.Italic = False
objShape.TextFrame.TextRange.Font.Underline = False
objShape.TextFrame.TextRange.ParagraphFormat.Alignment = msoAlignParagraphCenter
objShape.TextFrame.TextRange.ParagraphFormat.LineSpacingRule = msoLineSpaceSingle
objShape.TextFrame.TextRange.ParagraphFormat.SpaceBefore = 0
objShape.TextFrame.TextRange.ParagraphFormat.SpaceAfter = 0
objShape.TextFrame.TextRange.ParagraphFormat.LineSpacingMode = msoNoLineSpacing
objShape.TextFrame.TextRange.ParagraphFormat.Leading = 0
objShape.TextFrame.TextRange.ParagraphFormat.Sloping = 0
objShape.TextFrame.TextRange.ParagraphFormat.Orientation = 0
objShape.TextFrame.TextRange.ParagraphFormat.OutlineLevel = 0
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor2 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle2 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor3 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle3 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor4 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle4 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor5 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle5 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor6 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle6 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor7 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle7 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor8 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle8 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor9 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle9 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor10 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle10 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor11 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle11 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor12 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle12 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor13 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle13 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor14 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle14 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor15 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle15 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor16 = wdColorBlack
objShape.TextScript.TextRange.ParagraphFormat.OutlineStyle16 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor17 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle17 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor18 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle18 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor19 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle19 = wdOutlineStyleNone
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor20 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle20 = wdOutlineCode
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor21 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle21 = wdOutlineCode
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor22 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle22 = wdOutlineCode
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor23 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle23 = wdOutlineCode
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor24 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle24 = wdOutlineCode
objShape.TextFrame.TextRange.ParagraphFormat.OutlineColor25 = wdColorBlack
objShape.TextFrame.TextRange.ParagraphFormat.OutlineStyle25 = wdOutlineCode
objShape.TextFrame_Click
这个代码会创建一个心形图案,并将其添加到Word文档中。你可以将这段代码保存为一个`.vbs`文件,然后在Word中使用VBScript运行它。请注意,这个代码只能在Windows操作系统上运行,并且需要有对Word应用程序的访问权限。