0
我想替換頁腳中的標籤。它可以工作,但替換刪除頁腳文本上方的水平線。 如何在不刪除水平線的情況下更換標籤? 如何在頁腳中繪製一條線?MS Word VBA動態頁腳
Private Sub Document_Open()
Dim unit As String
Dim footer As String
unit = "New text"
footer = ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).Range.Text
ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).Range.InlineShapes.AddHorizontalLineStandard
footer = Replace(footer, "<<Label>>", unit)
ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).Range.Text = footer
End Sub
非常感謝你。 – sada 2012-08-15 10:28:08