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)
HELP with word fileSite 8.1 event handlers
appguy
I'm trying to create an event handler in word that fires when the "NO" button is pressed on the Worksite Office Integration dialog box when you close a document in word. I've looked at the custft8xEAI.dot I found here in the forums, but it hasn't been much help. It looks like the event
objIManFileSaveCmdSink_OnCancel
is the event I need to capture, however, a simple Msgbox "test" won't even fire when included in that event.
Initially, I tried working around FileSite and wrote my own event handler in Native Word. This worked GREAT, until a problem came up. Basically, the code worked until someone opened a filesite document and copied text to the clipboard. When you close the document, since no changed were made, the document still is marked as "clean" so no filesave dialog pops up. However, when this happens, the document isn't checked back in! To add more mystery...when you open a document...and make one change---to mark the document as dirty...and then copy your text to the clipboard, you'll get the file save dialog--you click NO...and the document is properly checked back in. SO....it seems that Filesite is having a problem checking in a document that has text which was just copied to the clipboard when no changes have been made to the document.
What is going on with the clipboard and Filesite upon close? Seeing that I couldn't figure this out, I opted to dive into the filesite event handler site to get away from that problem.
Anyone have any thoughts/insight into this. I would be happy to share my Native word code or Filesite handler code if requested.
Find more posts tagged with
Comments
jny
There isn't a way to hook into that close button. There is no interfaces exposed by that dialog.
When something is inside the clipboard, or the document is edited without end-user's explicit save, the file handle is not yet released by Word, thus there isn't a good way to actually checkin the document after you have programmatically worked on the opened document...not even at Quit.
There isn't a way to tell when Word would release that file. This happens when you are working on both a local as well as a WorkSite document.
I don't believe there is a way to circumvent this.
The IManO2K events will not be suitable for you in this case.
appguy
Thanks for your reply jny!
In further testing, I've tried to "break" the clipboard connection by adding an empty string ("") entry to the top entry in the clipboard which bumps down the users last clipboard selection. This seems to work and breaks the connection allowing the document to be checked back in. So, now I'm trying to delete clipboard item I just put in to put the users item back in place.
However, I'm limited in word vba with the dataobject object. I can't figure out how to delete an item from the clipboard. I don't think I can from the VBA side.
Do you think this workaround approach is worth exploring further?
jny
I think it's worth exploring if you don't mind loosing the clipboard stuff on your check-in document.
I would, however, make sure to update the document profile so that metadata changes are preserved on the WorkSite document.