There is the possibility to specify the position(relative page, relative paragraph, relative text, ecc) of a image at run merge?
MailMergeGetText(Sender: TObject;
const inspname: String; Contents: TWPMMInsertTextContents);
var textobject : TWPOIMAGE;
begin
if contents.CurrentObject= nil then
begin
create:=true;
// textobject :=TWPOImage.create(wprtf.Memo.RTFData);
textobject :=TWPOImage.create(wprtf);
end
else
textobject:=TWPOImage(contents.CurrentObject);
textobject.Graphic:=jp;
if create then
begin
textobject.WidthTW:=WPCentimeterToTwips(varBol.width);
textobject.HeightTW:=WPCentimeterToTwips(varBol.height);
contents.Obj:=textobject;
end
else
begin
Contents.CurrentObject.WidthTW:=WPCentimeterToTwips(varBol.width);
Contents.CurrentObject.HeightTW:=WPCentimeterToTwips(varBol.height);
end;
end
You will have to add a new and positioned image inside the MailMerge event and leave "Contents" unchanged. You can do most operations with the TWPRichText inside the event, since the contents of the field are selected when OnMailMergeGetText is beeing called.
The textobject belogs to a paragraph can may not be created like this.
as I said:
You will have to add a new and positioned image inside the MailMerge event and leave "Contents" unchanged. You can do most operations with the TWPRichText inside the event, since the contents of the field are selected when OnMailMergeGetText is beeing called.
While the program is inside the event handler you can insert an image into the text using the usual (cursor) methods and NOT use Contents.
#5♥ 0
This category is archived. No new posts are possible.