I wrote a Delphi 2006 procedure to send a group of Filesite documents via Outlook 2007 using the SendDocCopyCmd command. The structure of the procedure is very similar to others where I use IManExt.CheckoutCmd and IManExt.ViewCmd. These all work flawlessly.
Problem: When the send doc procedure is called, I will get a Worksite popup that says:
"IManExt: Unable to obtain selected document(s) information. The current database or server might be unavailable.
Microsoft Office Outlook
Path does not exist. Verify the path is correct"
The call goes as far as creating a stub message with the attached documents and no other information. The stub can be found in the Outlook Drafts folder. I am expecting to see the Outlook message editor but I get the error instead. Once I find the draft message, I can finish it. I notice that when you use Right Mouse Click and choose Send Doc from Filesite Outlook integration, the subject line is set as the name of the document. I do not get that. The only change is that the documents are attached. Any ideas? Abbreviated code follows:
procedure TDMSUX.MailDoc(hw: HWND; mDoc: IManDocument

;
var
pView: SendDocCopyCmd;
pCtx: ContextItems;
pArry: OleVariant;
pDoc: INRTDocument;
begin
pArry := VarArrayCreate([0,1],varDispatch);
pDoc := mDoc as INRTDocument;
pArry[0] := pDoc;
pCtx := CoContextItems.Create;
pCtx.Add('ParentWindow',hw);
pCtx.Add('SelectedNRTDocuments',pArry);
pView := CoSendDocCopyCmd.Create;
pView.Initialize(pCtx);
pView.Update;
if pView.Status = nrActiveCommand then
pView.Execute;
// clean up
pDoc := nil;
VarClear(pArry);
pView := nil;
pCtx.Remove('ParentWindow');
pCtx.Remove('SelectedNRTDocuments');
pCtx := nil;
end;