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 and AutoOpen
MikeatBDB
Hi all
We have a problem in using iManage8 and our Office 2003 templates.
On our Word 2000 templates we use the AutoOpen of the current document to catch when a SaveAs has been performed. The AutoOpen is always run when a SaveAs has been performed. Our code works beautifully.
In Word 2003 the AutoOpen is not performed even when security is set to Low. We need to trap this even if it is within the sink object as we want to bring information from the profile into the document using bookmarks. The correct information appears in the document when the AutoOpen macro is run manually.
Does anyone know where an entry point after the SaveAs dialog closes / Word Document is saved? Or is there something in my templates (It's about 2meg of code) that is causing this.
Thanks
Mike
Bircham Dyson Bell
Find more posts tagged with
Comments
MikeatBDB
Hi all
Still working on this problem. I have tried to solve it by using the trap for the FileSave from the info in the Webcast using the following objects
Private WithEvents objNewIManFileSaveCmd As IMANEXT2Lib.IManFileSaveCmd
Private WithEvents objNewIManFileSaveDlg As IMANEXT2Lib.IManFileSaveDlg
However this works fine if it is for saving within the same database but I need to trap when a document is saved from our precedent database (BDBPrec1) to our main database BDB1. The BDBPrec1 database is read only for most users so the precedents can be controlled. We need to update the profile information in the body of the document when it is save to BDB1. This does not get trapped.
Anyone got any ideas?
Thanks
Mike
Bircham Dyson Bell
guido1
Not sure about the use of AutoOpen these days: it's a legacy procedure in Word that predates the introduction of events in the Word object model. I'd recommend deprecating its use entirely if you can, and using the Application object's DocumentOpen event (or, the Document object's Open event, if you're embedding code in each template)
Having said that, if I've understood you correctly, you should be able to capture the DocumentBeforeSaveAsOptions event of the iManageExtensibility object. Within that event capture the details of the document (maybe just docnumber and version number), then on the PostOnOk event of the iManFileSaveCmd test to see if the current document's values have changed compared to the previous ones.
This should mean that the profiled document was saved as another (either new version, or new document)
Another option you could consider is to dispense altogether with out-of-the-box SaveAs handling: to do this, set the IgnoreIIManageSave parameter in the DocumentBeforeSaveAsOptions event to True, and then instantiate the SaveAsOptionCmd. You can then securely test the user response to the SaveAs action
Whatever method you choose, you then launch whatever code you need (ie the stuff currently in your AutoOpen) to update your bookmarks, etc
MikeatBDB
Guido
We have made some progress on this. I have tried rewriting it to use the iManSaveCmd event handler but on speaking to our consultants in London we cannot use this as we are not using the enhanced Save dialog. The users rejected using this dialog as they would have to use two dialog to save any documents so we had to go back to the old Save dialog. We have reported our issues to the consultants (PhoenixBS) and I think they have passed them on to Interwoven.
The autoopen will still work in 2003 when we have done tests outside of iManage so I am now stuck again.
Thanks
Mike
Bircham Dyson Bell
guido1
if your users are going to be working in Classic mode, then you have the CreateNewProfile event at your disposal. This event fetches you a pointer to the ImportCmd object which has its own events, similar to IManFileSaveCmd
wouldn't this meet your needs?
MikeatBDB
I have found a solution that works. I did use the importcmd (Guido I only saw your post after I sorted it out but thanks.) but I did have one problem. I was using the activedocument instead of the IManDocument passed into the event. When I changed this and used the GetAttribueByValue for the IManDocument everything then worked.
Thanks for your help
Mike
Bircham Dyson Bell
Orders.rptdesign