• I am attempting to do a mail merge and send the resulting document directly to the printer. I noticed in the help file that I must use editor.Memo.PrintPages 1,99999 (since I am using VB) and am trying to use this with BeginPrint and EndPrint. What I have found is that the document does get printed BUT any lines that have merge fields on them are blank. If I merge to Memo2 and then do a Memo2.PrintPages 1, 99999 it prints fine. I'm possibly printing over 5,000 pages so I don't want to have to merge to a new document first and then print.

    Sample code:
    editor.BeginPrint "filename"
    Do while not recordset.eof
    editor.Memo.MergeText ""
    editor.Memo.PrintPages 1, 99999
    recordet.MoveNext
    Loop
    editor.EndPrint

    Thank you,

    Heather

    • Offizieller Beitrag
    Zitat

    I had to issue a Memo.Reformat after each MergeText to get the PrintPages to work correctly.

    Yes, this is normal. The formatting is performed when the app is idle, if it is not before you print of export to PDF you need to call ReformatAll.

    In VB6 "PrintPages" must be called instead of "Print" since the latter is used in a hardcoded way by VB - the control never receives the call.

    Julian