wordApp.Application.Quit() End Sub AA:
wordApp.Find.ClearFormatting
wordApp.Find.Text = \审稿人\
wordApp.Find.Replacement.Text = \wordApp.Find.Forward = True
wordApp.Find.Wrap = wdFindContinue wordApp.Find.Format = False wordApp.Find.MatchCase = False
wordApp.Find.MatchWholeWord = False wordApp.Find.MatchByte = True
wordApp.Find.CorrectHangulEndings = False wordApp.Find.MatchAllWordForms = False wordApp.Find.MatchSoundsLike = False wordApp.Find.MatchWildcards = False wordApp.Find.MatchFuzzy = False
wordApp.Find.Execute
QQ:请问如何将加载的菜单不是以悬浮的菜单形式出现? AA:CommandBar的Position属
QQ: 在vb中将word文件保存为纯文本 AA:
Private Sub Command1_Click()
Dim oW As Object, oD As Object, x As Object Set oW = CreateObject(\Set oD = oW.documents.open(\'oW.Visible = True
For Each x In oD.words Text1 = Text1 & x Next x
Open \Print #1, Text1 Close #1 oW.quit End Sub
QQ:怎么在一个word文档的最后插入东西 AA:
WORD XP的VB帮助中有示例:
本示例在名为“Changes.doc”的文档末尾插入文本。“For Each...Next”语句用来判断此文档是否已打开。
For Each aDocument In Documents
If InStr(LCase$(aDocument.Name), \Set myRange = Documents(\myRange.InsertAfter \End If
Next aDocument
QQ:在WORD的宏里如何编写查询页数和行数, AA:
ActiveDocument.BuiltInDocumentProperties(wdPropertyPages) ActiveDocument.BuiltInDocumentProperties(wdPropertyLines)
QQ:请问网页考到word后,那个向下的箭头是什么标记,如何自动替换掉?手工替换很麻烦阿!但又不知道这是什么标记,无法下手阿。急用!! AA:
手工换行符
可以用查找替换的,或者试试这个
Sub blankdel() Dim i As Integer
For i = ActiveDocument.Paragraphs.Count To 1 Step -1 ActiveDocument.Paragraphs(i).Range.Select a = Selection.Words.Count If a = 1 Then Selection.Delete m = m + 1 End If Next i
MsgBox \共删除空白段落\个\End Sub
按ALT+F11,把代码COPY进去运行一下就行了
QQ:请问怎么样用word对象中控制word的分页? AA:
我刚刚试出来的:此VB6下的代码可以解你问题
Set pword = CreateObject(\pword.Documents.AdddotName, False
pword.WindowState = 2 'wdWindowStateMinimize '2
pword.Selection.InsertBreakwdPageBreak
QQ:我想控制用户只能修改Word文件的部分内容,所以需要设置部分区域为只读,不知道该用什么方法,请大家赐教。 AA:
Selection.InsertBreak Type:=wdSectionBreakContinuous ActiveDocument.Sections(1).ProtectedForForms = False ActiveDocument.Sections(2).ProtectedForForms = True
ActiveDocument.Protect Password:=\wdAllowOnlyFormFields
QQ:请问怎么插入图片的 AA:
Dim myShape As Shape
Dim MyInshape As InlineShape '插入一个嵌入式图片对象
Set MyInshape = Selection.InlineShapes.AddPicture(FileName:=\LinkToFile:=False, SaveWithDocument:=True) '将InlineShape对象转变为Shape对象 Set myShape = MyInshape.ConvertToShape '使图片浮于文字上方
myShape.WrapFormat.Type = wdWrapNone
QQ:如何访问表格单元格内容 AA:
objWordDoc.Tables(3).Cell(1, 1).Range.Text

