Using VB or VBA... Is there a way to grab docid from currently open view/form in notes?

Is there a way in VB or VBA to grab the DocID of the view/form that is currently opened in Lotus?

For instance if I have a view/form that is currently opened in lotus (ie. Personnel Entry Form) and after someone completes the entry and saves it but is still in the entry screen with the data being shown. I want to get that particular view’s/form’s DocID so that I can reference which id to grab the data from.

Subject: Using VB or VBA… Is there a way to grab docid from currently open view/form in notes?

Dim ws as new notesuiworkspaceSet uidoc = ws.currentdoc

id = uidoc.document.universalid

Subject: RE: Using VB or VBA… Is there a way to grab docid from currently open view/form in notes?

Cannot seem to get that to work in MS Word. Any Advice?

Here is what I tried.

Sub testing()

Dim ws As New notesuiworkspace

Set uidoc = ws.currentdoc

ID = uidoc.Document.UniversalID

MsgBox ID

End Sub

But when I run it it get “User defined type not defined.” on Dim ws As New notesuiworkspace