Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Filing Emails using IManage Api
DevGordon
I'm trying to use the IManage Api to File Emails.
Has anyone got any good examples on how to use the IManDocument object to check in and out Emails
Here is the VB.NET code I'm using: -
Dim objIManDoc As IManage.IManDocument = Nothing
Dim strLocation As String = ""
Dim dtDueDate As DateTime
Dim objIManUser As IManage.IManUser
Dim objDocType As IManage.IManDocumentType
Dim objDocClass As IManage.IManDocumentClass
Dim objSubClass As IManage.IManDocumentClass
'Create our IManDocument
objIManDoc = mIManDatabase.CreateDocument
'Get our user
objIManUser = mIManDatabase.GetUser("MyUserID")
objIManDoc.SetAttributeByID(imProfileAttributeID.imProfileAuthor, objIManUser)
objIManDoc.SetAttributeByID(imProfileAttributeID.imProfileOperator, objIManUser)
objIManDoc.SetAttributeByID(imProfileAttributeID.imProfileType, objDocType)
objIManDoc.SetAttributeByID(imProfileAttributeID.imProfileClass, objDocClass)
'Update the document's profile changes on the server
'Dim objResult As IManProfileUpdateResult = objIManDoc.UpdateWithResults()
If objIManDoc.IsOperationAllowed(imDocumentOperation.imCheckInDocumentOp) Then
Try
objIManDoc.CheckOutEx(strLocation, imCheckOutOptions.imDontReplaceExistingFile, dtDueDate, "Test CheckOut", imHistEvent.imHistoryCheckout, "generatingApplication", "Location")
Catch ex As Exception
End Try
End If
strLocation = objIManDoc.CheckoutLocation
The objIManDoc.IsOperationAllowed returns false and so the CheckOutEx dosn't ever run
Find more posts tagged with
Comments
wasabi
When you check in the emails, can you also import the emails headers? (From, to, received dates, etc?)
I am having problem with that. All the emails imported by my code don't have those informations but if I manually drag the emails into Filesite, the headers are imported with no problems.
Regards,
Bony
IestynJ
I think you need to set your doctype and docClass objects.
docClass is "E-MAIL" and docType is "MIME" i think. I'm pretty new to the API so i might be wrong.