如何设置Word表格的VBA代码
点WORD左上角OFFICE图标,在弹出来的框右下角有一个"WORD选项",弹出WORD选项框,在页面上有几个复选框,勾选“在功能区显示“开发工具”选项卡”,然后确认。
回到WORD 界面,在菜单栏上面多了一个“开发工具”,点击“开发工具”就可以看到visual basic 也就是VBA代码编辑的地方了。
Excel中运用wordVBA代码
解决你的“顺便问下".....Sub Macro1()Dim strText As StringstrText = "建立反对撒客里空的龙卷风"Selection.TypeText strTextSelection.MoveStart Unit:=wdLine, Count:=-1Selection.MoveEnd Unit:=wdCharacter, Count:=-1 * (Len(Selection.Text) - 4)Selection.MoveStart Unit:=wdCharacter, Count:=3Selection.Font.Bold = TrueMsgBox Selection.TextEnd Sub
重金,重金悬赏一个关于wordVBA编程问题!!!!!请问选定w
问题: 我想打印在wod文档中所有包含了某个人姓名的页 我粗略编了一个宏: Su Maco1() ' ' Maco1 Maco ' 宏在 2004-10-14 由 ill 录制 Dim i As Intege Selection.Find.CleaFomatting With Selection.Find .Text = "婷 '要查找的姓名 .Replacement.Text = "" .Fowad = Tue .Wap = wdFindContinue .Fomat = False .MatchCase = False .MatchWholeWod = False .MatchByte = Tue .MatchWildcads = False .MatchSoundsLike = False .MatchAllWodFoms = False End With Do While Selection.Find.Execute ActiveDocument.PintOut Range:=wdPintCuentPage '若找到姓名,则打印当前页 Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Count:=1, Name:="" '下翻一页 Loop End Su
VBA代码是什么????????
Dim myMenuBar Dim newMenu Dim ctrl1 Dim s Dim flag As String '初始化菜单 Set myMenuBar = CommandBars.ActiveMenuBar Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _ Temporary:=True) newMenu.Caption = "电子印章" Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1) ctrl1.Caption = "添加电子印章" ctrl1.Style = msoButtonCaption ctrl1.OnAction = "AddSeal" Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1) ctrl1.Caption = "验证电子印章" ctrl1.Style = msoButtonCaption ctrl1.OnAction = "CheckSeal" ctrl1.Style = msoButtonCaption Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1) ctrl1.Caption = "关于" ctrl1.OnAction = "About" ctrl1.Style = msoButtonCaption
转载请注明出处51数据库 » word vba编程代码大全