Beiträge von Dave Henrickson

    I am running WpTools4.11d in an Delphi 4 environment and am getting an intermittent access Violation in WPRTFTextPaint.SetGlobalVar
    (about 1 times out of 12) in the process of flushing and inserting text into a temporary WpRichText control. I am using the code below to search out custom mail merge tags and replace them with content.

    -- the calling program does a FastClear on TempRichText before calling


    Any suggestions? Sorry about the formatting, the indents seem to have gotten lost somewhere along the way.

    Dave Henrickson

    I am trying to add a mail merge field to my text. If the data in mail merge exceeds a certain length it could result in pushing the next paragraph (which also has some mail merge fields) on the next page. When this happens I lose the next paragraph i.e. it does not show up in either view or print on the second page.

    Has anyone else experienced a similar problem? I will appreciate any help.

    I am working with the TWPRichEdit component in WPTools 4.11d and have encountered a problem when print spooling a large number of duplex letters. My code includes the following logic during the print process to ensure that each new document starts on its own page rather than the back of the previous document should it have an odd number of pages:


    LetterRichText.Print;
    iPageCnt := LetterRichText.CountPages;
    if (iPageCnt mod 2) = 1 then
    WPTPrinterWrapper.NewPage;

    Occasionally, however, this code seems to add an inappropriate page break – throwing the entire batch process off from there on. I believe the problem has to do with the fact that we are selecting and replacing text in the letter to generate dynamic content as well as printing or suppressing headers and footers based on custom codes embedded in the document. Is there a way I can repaginate the contents of the TWPRichText control before printing?

    Thanks,
    Dave Henrickson

    I am using WpTools4.11d in a Delphi 4 environment and have come across what I believe to be a bug when print spooling duplex letters using the rtf format.

    The problem occurs when you have a document with an odd number of pages followed by another document. The second document begins printing on the back side of the last page of the first document so that the two separate documents are now just one document. The answer would seem to be a page feed when an end-of-text character is recognized but I don't know how to implement this with wptools and rtf.

    Does anyone have an answer?

    Thanks,
    Dave Henrickson

    Sorry, my bad. It helps if you actually set the value of PrintDuplex appropriately.

    I do have several, what hope are intelligent questions, however.

    1. If I set PrintDuplex to something other than wpdNone and then display the print dialog box, the printer properties do not indicate duplex mode. Is there someway I can update the printer properties at the same time I set PrintDuplex?

    2. PrintDuplex overrides anything duplex/nonduplex choice the user might select from the printer dialog box (I have to show them this, I have no choice). Is there someway to update the value of PrintDuplex based on a change the user made in the printer dialog?

    3. Is there someway I can change the duplex mode in the middle of a print spool operation (so some documents can print duplex while others do not) without breaking the spool?

    Thanks,
    Dave Henrickson

    I am working with WpTools4.11d in a Delphi 4 environment and am not having any luck with duplex printing. The only reference I have found to duplex printing is the PrintParameter.PrintDuplex property but when I set this equal to wpdHorizontal nothing happens. I'm guessing this isn't the entire story, or even part of it.

    The printer I'm working with does do duplex with applications like Word without any problem.

    Any help would be appreciated. Thanks.
    Dave Henrickson