Skip to main content
Participating Frequently
June 12, 2007
Question

Unlock InCopy stories with ID CS2 Server

  • June 12, 2007
  • 2 replies
  • 1119 views
Hi all,<br /><br />I have an ID document with an Assignment associated to. I'm trying to unlock a InCopy Story of this Assignment with ID CS2 Server but i'm having problems. I'm trying this way:<br /><br />UIDList list(storyRef);<br /><br />InterfacePtr<const IInCopyBridgeCmdSuite> bridgeCmdSuite(::CreateObject2<const IInCopyBridgeCmdSuite>(kICBridgeBaseCmdBoss));<br /><br />bridgeCmdSuite->EditInPlace(list);<br /><br />where storyRef is the UIDRef of the story i'm trying to unlock.<br /><br />In ID CS2 this works ok and the lock file is created for that InCopy Story, but this is not working in ID CS2 Server. The story is not unlock and there are no lock files for that story. If i check if there are any unlock stories this way<br /><br />bool16 b = Utils<IInCopyBridgeUtils>()->AreStoriesLocked (idoc);<br /><br />the result is kFalse.<br /><br />Could anybody help me please?
This topic has been closed for replies.

2 replies

aprunedaAuthor
Participating Frequently
June 13, 2007
Thanks a lot Tom,

that was the problem. I can unlock The InCopy stories now.
Participating Frequently
June 12, 2007
It may be that the InCopy user name is not set. The server can't prompt for it and the lock will fail if it isn't. Try calling...<br /><br /> #include "IInCopyBridgeUtils.h"<br /><br /> PMString theUser("a user",-1,PMString::kNoTranslate);<br /> Utils<IInCopyBridgeUtils> bridgeUtils;<br /> if ( bridgeUtils != NULL )<br /> bridgeUtils->SetInCopyUsername( theUser );<br /><br />.. before doing the lock.