什么时代了,帮助以外的东西学会使用Ai搜索啊,都有现成的代码

此主题相关图片如下:1.png

Try
Dim doc = app.Documents.Open(fl)
For Each section As Object In doc.Sections
Dim headerRange = section.Headers(MSWord.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range
headerRange.Text = headerRange.Text.Replace("替换页眉", "111").trim(vbcr).trim(vblf)
Next
Doc.save
Doc.close
Catch ex As exception