可以使用:
Sub Test()
ActiveDocument.Variables.Add Name:="PermanentVar", Value:=100
'ActiveDocument.Variables("PermanentVar").Delete
End Sub
Run Code Online (Sandbox Code Playgroud)
检查是否保留:
Private Sub Document_Open()
Msgbox ActiveDocument.Variables("PermanentVar")
End Sub
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3590 次 |
最近记录: |