I am trying to return the document number of a newly profiled document as it is saved into worksite from msword. I have been using the following code, Sub NewProfileCmd_PostOnOK(obj)obj.GetAttributeByID(imProfileDocNum)End Subhowever the number returned is blank assuming that the number has not been created at the time this event is processed. Can anyone point me in the right direction of which script would be best to run and on what event to capture this new document number.Thanks in advanceJames
FYI: I managed to get the New DocNumber using the NewProfile.nrs script, however I could not get the version (but this will be 1). It seems Version is a late-bound property of the IManDocument object requiring the server to return a value. I can’t get it here - not important for what I need to do.Thanks. This thread really helped.Sub NewProfileCmd_PostOnOK(dlg) Dim oImportedDoc Dim num Dim ver set oImportedDoc = Context("ImportedDocument") num = oImportedDoc.Number' ver = oImportedDoc.Version' Above line gives ERROR: Description: Variable is undefined: 'Version' MsgBox ("NewDocNum: " & num)End Sub