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)
SaveAs->New Document, updating document number
toast
Hi Everyone,
We are trying to write a word customisation such that when the user does a File->SaveAs (New Document), we can update the new document with the new document number in the reference.
We are coding in VBA and have a class that has :
Private WithEvents m_IManExtObj As iManO2K.iManageExtensibility
Private WithEvents m_IManSaveCmd As IMANEXT2Lib.IManFileSaveCmd
Private WithEvents m_IManOpenCmd As IMANEXT2Lib.IManFileOpenCmd
Private WithEvents m_IManImportCmd As IMANEXTLib.ImportCmd
I've tried to use the sub m_IManSaveCmd_PostOnOK. In here I do :
Dim m_iManSaveDlg As IManFileSaveDlg
m_iManSaveDlg = pMyInterface
MsgBox m_iManSaveDlg.GetAttributeByID(imProfileDocNum)
and the doc Num here is empty.
I've read in the forums that i can use the m_IManExtObj_OnCreateNewProfile, however, this event doesn't even seem to be triggered on a save as->new document. Is there any event / way to get the new document information AFTER its saved into interwoven and had its profile updated?
Thanks in advance everyone!
Find more posts tagged with
Comments
toast
Hi Everyone,
Ok i've just figured it out. The PostonOk event does have reference to the new document.. i've done this :
Private Sub m_IManSaveCmd_PostOnOK(ByVal pMyInterface As Object)
Dim myiManSaveDlg As IManFileSaveDlg
Dim myNewDocument As IManDocument
Set myiManSaveDlg = pMyInterface
Set myNewDocument = myiManSaveDlg.NewDocument
End Sub
I've chucked the final code in here in case anyone in the future gets this issue.
Toast