该示例显示活动文档的 UserControl 属性的状态。

Set Mywps = New WPS.Application
Set wpsDoc = _
    wps.Documents.Open("C:\mydocument.wps")
If wpsDoc.UserControl = True Then
    MsgBox "This document was created or opened by the user."
Else
    MsgBox "This document was created programmatically."
End If