OnMailMergeGetText Image PositionMode

  • There is the possibility to specify the position(relative page, relative paragraph, relative text, ecc) of a image at run merge?


    Thanks.

    Regards

  • Hi,

    i used in event mailmerge this code :

    Code
    Imageobject :=TWPOImage.create(wprtf);                  textObject:=TWPTextObj.Create;                  textObject.ObjRef:=Imageobject;                  textObject._SetObjType(wpobjImage);                  textObject.PositionMode:=wpotPage;                  textObject.Wrap:=wpwrBoth;                  contents.Obj:=textObject;

    but so i don't see the image.... if i replace

    Code
    contents.Obj:=textObject;

    with

    Code
    contents.Obj:=imageObject;

    i see the image but the positionMode doesn't work.
    Any suggestions ?

    REgards

    • Offizieller Beitrag

    The textobject belogs to a paragraph can may not be created like this.

    as I said:

    Zitat

    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.