0

how to find Start with "一、" "二、" "三、"(chinese 1、2、3) ... in word, than change the paragraph font to bold with Regular expression

For Each pa In .Paragraphs
            If pa.Range.Find.execute("一、") Then
            pa.Range.Font.Name = "黑体"
            End If
            Next pa

display "Object does not support the property or method" on

If pa.Range.Find.excute("一、") Then
JasonYun
  • 999
  • 2
  • 11
  • 15
  • Typo! The method is Find.ex**e**cute (you missed an `e`). – Pᴇʜ Jan 10 '20 at 13:19
  • OK,it's work,but Regular expression – JasonYun Jan 10 '20 at 13:23
  • 1
    Have a look at [how to implement RegEx](https://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops) . It is for Excel but works almost the same in Word. – Pᴇʜ Jan 10 '20 at 13:25

0 Answers0