Home
TeamSite
Access is denied - Worksite Office 2007 Integration
sammy3d
Hi,
I am getting the following error when trying to save a document in iManage and close word application. The error occurs when our custom addin is enabled. The addin has documentbeforeclose, documentbeforesave, documentaftersave event handlers. I am unable to debug the error as the error is occuring in 'iManO2k' addin.
Has anyone seen this issue before? Any idea if a more detailed error message is logged somewhere?
An error occurred in the COM add-in named 'iManO2k'.
Error #-1073741819
[NRTSession][Logout]Access is denied.
Location: iManage.NRTDMS.2[CSessionInfo][Class_Terminate]
I appreciate the help.
Thanks,
Sammy
Find more posts tagged with
Comments
jny
I didn't know that there's documentaftersave event.
I've seen this error many times before but the source of this error usually comes from the custom code. It only appears to be coming directly from the WorkSite Add-In because it fails to close the document caused by something that happend from the customzation.
You should be able to step into your own code and see where the error is occurring first. Have you done that and not be able to see any errors? If so, would you send in your VBA or COM-AddIn project, along with the use case steps?
sammy3d
Thankyou for the reply.
After further testing, I found that the following lines in the custom code (vb.net) are causing the error (where mImanDoc is of type IManage.NRTDocument):
mstrClientID = mImanDoc.CustomAttributes.Item(1).Name.ToString
mstrClientName = mImanDoc.CustomAttributes.Item(1).Description
mstrMatterID = mImanDoc.CustomAttributes.Item(2).Name.ToString
mstrMatterName = mImanDoc.CustomAttributes.Item(2).Description
When I remove these lines, it is working fine. Also, when I debug through the custom code, I did not see anything unusual. I am able to display the attributes using a message box. Is there any other way we should be reading the custom attributes?
Also, I disabled the custom Addin and tried to run a script on an iManage document that displays the above mentioned custom attributes in a message box. I got the 'Access is denied' error when I tried to close the word application. But it was not consistent. Out of 10 times, I got the error once or twice.
BTW, we used the following line (as a last statement in the documentbeforesave) to simulate the documentaftersave event:
Application.OnTime when:=Now, Name:="AfterSave"
The custom vb.net code is called from the 'AfterSave' VBA code.
jny
The proper way of querying for the custom field's alias as well as description is through the GetAttributeByID (IManDocument/NRTDocument) Method, like so:
'//Assuming mImanDoc is a valid handle to the IManDocument Object.
Set client = mImanDoc.GetAttributeByID(imProfileCustom1)
sClientAlias = client.Name
sClientDesc = client.Description
Set matter = mImanDoc.GetAttributeByID(imProfileCustom2)
sMatterAlias = matter.Name
sMatterDesc = matter.Description
sammy3d
Yep!!!! It did the magic.
Thanks a lot.