我正在嘗試在大量單詞文檔中查找項目符號列表的所有實例,並根據我們公司的品牌爲其分配樣式。如何在單詞宏內選擇多個項目符號列表
我已經非常接近了,下面的宏選擇選擇中第一個項目符號列表中的第一行,併爲其指定我需要的樣式。
我只需要一些幫助讓它選擇文檔中的所有項目符號。
Sub findbullets22()
'findbullets22 Macro
Dim oPara As Word.Paragraph
With Selection
For Each oPara In .Paragraphs
If oPara.Range.ListFormat.ListType = _
WdListType.wdListBullet Then
oPara.Range.Select
End If
Next
End With
Selection.Style = ActiveDocument.Styles("List Paragraph")
End Sub
亞洲時報Siddharth嗨 - 非常感謝你的幫助,我要把它放到我的文檔,現在情況是前兩個項目符號列表得到的風格,其餘被刪除。 – nicemanda 2012-08-16 06:20:28
任何想法爲什麼這可能會發生?非常感謝你提供的任何見解:) – nicemanda 2012-08-16 06:21:14
線索在這裏'With Selection'如果子彈不在選擇中,那麼它們將被忽略;) – 2012-08-16 06:24:41