VB ,VBA简单问题

来源:百度知道 编辑:UC知道 时间:2024/06/06 19:48:05
With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary)
Dim foot As String
foot = .Range.Text
If foot = "文摘" Then
def = def + 10
End If
End If
End With
错在哪里,怎么改
END IF 那个问题不用管的,前面的语句有错

headers("")括号里面内容加上引号
foot=.range.text不能这样写,如果这样是给foot赋值。不能用with语句

先加分,我帮你改哦

多了一行End If, 去掉之。

多了一行End If, 去掉之