Menu

#5 TOpWord.ActiveDocument not correctly set

open
nobody
None
5
2013-01-13
2010-01-19
No

There appears to be bug with the TOpWord.ActiveDocument property not being correctly set after a call to the ExecuteMailMerge method.

ie)

with OpWord1.OpenDocument(TemplateFileName) do begin
// Set the Data Source for the Mail Merge to a special purpose Turbo Power Data Source
MailMerge.OfficeModel := OpDataSetModel1;
PopulateMailMerge;
MailMerge.AsMailMerge.Destination := wdSendToNewDocument;
ExecuteMailMerge;

// Special Note: There appears to be a bug with the ActiveDocument method. It does not
// return a reference to the merged document which it should. Use the direct call to
// the underlying COM object to access it's ActiveDocument method instead

// ie) OpWord1.Server.ActiveDocument...

// Release the template
Free;
end;

Regards

Cameron Mathers

Discussion


Log in to post a comment.

MongoDB Logo MongoDB