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)
Document does not check in after running macro
System
My developer is on vacation so I'm trying to work my way through this...
We have a custom watermark macro that has 2 options. One option is to insert the watermark into a temporary document. When the users choose this option the open Worksite document is left abandoned and checked out. I tested using File, Local Save and it works fine. It looks like the custom macro is taking the existing active document and saving to a network drive but it is killing the actual worksite document in the process. A part of the macro is below that I think is creating the problem. I also attached the dot file. Any help would be very much appreciated.
'strActiveDocument = doc.FullName
strActiveDocument = "i:\temporary.doc" '6/5/'3 7/22/04 removed the rem
If Len(frmWatermark.txtSender.Text) > 0 Then
Selection.Style = ActiveDocument.Styles("styLetterHeaderSender")
' ActiveDocument.Bookmarks("Bmksender").Select
Selection.InsertAfter frmWatermark.txtSender.Text
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeParagraph
Find more posts tagged with
Comments
reesbevan
Hi, I found this technote on the same issue: 82005-1318 (text below).
I had a similar issue, and all I did was to always refresh and clear the imandoc object I was using, so:
imandoc.refresh
set imandoc = Nothing
Allan
===================================================
Technote text:
Issue/Symptom:
Certain custom macros for Microsoft Word may cause documents to remain checkedout upon closing the document. The following steps may be used to help diagnose the problem (these steps should be executed with macros installed):
Launch Microsoft Word;
Create a new blank document;
Choose File | Save As to import the document into WorkSite (e.g. Document 1);
Re-open Document 1 from DeskSite/FileSite;
Choose File | Save As in Word and save as a New Document (e.g. Document 2);
Close Document 2;
Re-open the Document 1 from DeskSite\FileSite;
Close Document 1.
After executing the steps outlined above, check whether Document 1 has checked back into the database as expected. If Document 1 remains checked out, then a custom macro may have inhibited the checkin process.
In environments with several custom macros installed, it may be necessary to systematically remove macros to identify the responsible macro.
Cause:
The problem occurs because of a stale document object left open by customization against the WorkSite SDK API. Since the document file handle is still in use, the WorkSite Desktop Client is unable to checkin the document.
Status:
This has been reported to Interwoven R&D as Defect 35442.
Resolution:
Interwoven recommends that customers experiencing this issue contact their macro developer or provider in order to modify the macro. To resolve this issue the macro can be modified as necessary to catch the native application_DocumentOpen event in Word to refresh the WorkSite document object as shown in the sample code below.
[VBA]
==========================================
Private WithEvents objAppSink As Application
Public Sub SinkIManageExtensibility( _
objExtensibility As iManO2K.iManageExtensibility)
Set objExtensibilitySink = objExtensibility
Set objAppSink = Application
End Sub
Private Sub objAppSink_DocumentOpen(ByVal Doc As Document)
Dim objActiveDocument As IManDocument
Set objActiveDocument = _
objExtensibilitySink.GetDocumentFromPath(Word.ActiveDocument.FullName)
If Not objActiveDocument Is Nothing Then
objActiveDocument.Refresh
End If
Set objActiveDocument = nothing
End Sub
==========================================
Migrateduser
I will give it a shot.
Thanks Allan!