Beiträge von lauf88

    The outline still doesn't work (the bullets are missing). And the page header/footer doesn't display:

    Here is the code:

    WPRichText2.asString:=WpRichText1.asString;
    WpRichText2.clearBody;

    while not vTable.eof do begin
    wpirchText1.mergeText;
    section:=wpRichText2.FastAppendText(wpRichText1,true,[wpCreateNewPage]);
    section.Select:=[wpsec_resetOutlineNums, wpsec_resetPageNumber];
    vTable.next;
    end;


    Result:
    Header/footer merged (the page number is not correct. Always show page 1).

    The outline is indented correctly, but the bullet indicator (solid dot) is missing.

    correction on the code sample code send...

    I'm using the latest 6.x version of the vcl. When I am doing the merge, I lost header/footer or outlines.

    Scenario #1 (this code Lost both of the header/footer and outline)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext2.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.fastAppendText(wprichtext1,false);

    Scenario #2 (this code Lost the header/footer, outline is correct)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext2.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.heder.assign(wprichtext1.header);
    wprichtext2.fastAppendText(wprichtext1,false);

    scenario #3 (this code lost the outline, the header/footer is correct)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext2.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.hederfooter.assign(wprichtext1.headerfooter);
    wprichtext2.fastAppendText(wprichtext1,false);

    What is correct coding to keep both? I have tried a few other way, but not successfull. I must missing something on the coding. Please HELP...

    I'm using the latest 6.x version of the vcl. When I am doing the merge, I lost header/footer or outlines.

    Scenario #1 (this code Lost both of the header/footer and outline)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext1.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.fastAppendText(wprichtext1,false);

    Scenario #2 (this code Lost the header/footer, outline is correct)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext1.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.heder.assign(wprichtext1.header);
    wprichtext2.fastAppendText(wprichtext1,false);

    scenario #3 (this code lost the outline, the header/footer is correct)
    WprichText1.OpenDialog(wpdiaload);
    wpRichtext1.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.hederfooter.assign(wprichtext1.headerfooter);
    wprichtext2.fastAppendText(wprichtext1,false);

    What is correct coding to keep both? I have tried a few other way, but not successfull. I must missing something on the coding. Please HELP...

    ok. The latest version fixed the saving of the page layout issue. Now I found that the the landscape page layout setting was not carry oover to the merged document.

    followings are some code:

    WprichText1.OpenDialog(wpdiaload);
    wpRichtext1.clearEx(true, false,true);
    Wprichtext1.mergeText;
    wprichtext2.fastAppendText(wprichtext1,false);

    I must be missing something that the page layout is not copied over to the merged document. Please help.

    this is what I see from my document for Landscape setting.

    {\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset2 Wingdings;}{\f2\fnil\fcharset2 Symbol;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\landscape\wpprheadfoot1\paperw15840\paperh12240\margl1886\margr1886\margt1440\margb1440\headery720\footery720\endnhere\sectdefaultcl{\*\generator WPTools_6.250;}{\plain\f0\fs22\cf0 this is my test for landscape setting...\par
    }}

    I'm currently using WPTOOL v6. When I set the Orientation to Landscape on the page layout, the page is on Landscape format, the I save the document, and reopen the document, the page format sets back to portrait.

    When I open the WPagePropDlg, the Landscape radio button is checked, but the document is portrait.

    How can I correct this?

    Questions on Saving the Mail Merge Results.

    After I saved the merged result and load it back into the WPRICHTEXT filed, it inserts a page break with each records that I merged. Am I done something wrong?

    The followings the samples:

    Master Document

    <<Last Name>>, <<First Name>>

    The merged result document
    Doe, John
    |---- Doe, Mary
    V
    |---- Sample, test
    V

    After save the result and load it back
    Doe, John
    <Page Break>
    Doe, Mary
    <Page Break>
    Sample, test