Beiträge von jeroen

    Hi,

    I'm having problems with my custom compiled dictonary for WPSpell.
    If I use it in my program, words that start with a capital (so actually every first word of a new sentence) are not recognized as valid words (underlined) though they exist in the list of alternatives?! Am I doing something wrong in the DCT Compiler? (tried it with and without the 'case sensitive' checkbox checked)

    I can upload the DCT file if you want me to?

    Kind regards,

    Jeroen

    Hi Julian,

    I did exactly as you told but still something is wrong. I succesfully created a file with a different address on each page with the demo MailM4. Then when I load this file in the editor of the LabelPrinting Demo and I go to 'Print Label' I see under the address tab 2 labels, the first holding 2 addresses and the first line of the third address, the second label contains the second line of the third address and the rest is empty.
    I created the file with de demo M4 I only put a query on the form instead of the table and of course ajusted the mailmergefields to the ones needed.
    Any idea what the problem can be? I can send you screenshots if you want them..
    btw: I've tried it also with the standard-output of the demo M4 with the biolife database but the same problem occurs.

    Jeroen

    Hi,

    Is it possible to ajust the LabelPrinting demo for printing a list of addresses? I'm familiar with the MergeFields but when I call the LoadAddress procedure from the WPLabelForm multiple times it replaces the text on the first label on the sheet.
    What I want is to loop though a database of addresses and then add every next address to the next label on the sheet. So what I need is a way to ajust the LoadAddress procedure in a way that I can pass the row and column of the destination-label as parameters.
    Is this possible?

    Hi Julian,

    I suggest you mean 'ignoremergefields'? Couldn't find the nomergefields formatstring in the manual.
    First of all i'm using the SaveToFile procedure from the TWPRichText to save the text.
    I've tried to save with SaveToFle(htmlfile, no, 'nomergefields') but this results in an empty html file.

    Regards,
    Jeroen

    Hi,

    I create the TWPRichText without a form (in the e-mail class) TWRichText.Create(nil).

    But you mean I neet to put the data from the editor (which is passed by another form to this unit) in a TWPRTFDataCollection and then pass this TWPRTFDataCollection to my e-mail class, assign the OnPrepareImageforSaving event and then save the document? A TWPRTFDataCollection doens't have a SaveToFile function so what should I do?

    Hi Julian,

    I don't exactly understand what you mean. Can you tell me what the Loaded procedure is supposed to do? I'm now using the following code:

    Code
    fDocument := TWPRichText.Create(nil);  fDocument.Loaded;  fDocument.OnPrepareImageforSaving := wpPrepareImageforSaving;

    Still the OnPrepareImageforSaving is not triggered when saving the document.
    What do you mean with assigning the data manually?
    I am using this code for an e-mail application.
    The code of the send procedure is as following:

    Code
    procedure TEmailTest.Send(document: TWPRichText; relation: TRelation; subject,
      from_address: string);
    begin
      fDocument := document;
      fSubject := subject;
      fFromAddress := from_address;
      fRelation := relation;
      SaveToFile;
      Send
    end;

    As you can see I'm passing a TWPRichText with the procedure. After this I assign this to the previously created fDocument (TWPRichText) field.

    Hi,

    I'm experiencing problems with the SaveToFile procedure of the TWPRichText. When I place an editor on a form and I place some code in the OnPrepareImageForSaving event everything works perfect!

    Now when I create an editor in runtime (using editor := TWPRichText.Create(nil) and then assign the PrepareImageForSaving procedure dynamically in runtime (editor.OnPrepareImageforSaving := MyPrepareImageForSaving), ofcourse after the creation of the editor, for some reason this event is not triggered?!

    Is this a bug or am I doing something wrong?

    I'm saving the contents of a richtext in a database using the following code:

    Code
    document := WPRichText.AsANSIString('WPTOOLS', false)

    When i'm trying to recover the saved data using:

    Code
    WPRichTest.AsString := document

    the bodytext shows up perfect but my headers and footers are gone?!
    However in the 'document'-string i can see the header and footer information.
    Can i recover this data without having to save the headers and footers apart from the bodytext (and thus creating them again with WPRichText.HeaderFooter.Get())?

    I'm trying to apply a different topmargin on all pages except the first one. I use the following code:

    Code
    procedure TfmLoFoInsert.wpLoFoMeasureTextPage(Sender: TObject;
      PageInfo: TWPMeasurePageParam);
    begin
      if PageInfo.pagenr = 1 then
        PageInfo.margintop := 5725
      else
        PageInfo.margintop := 2000
    end;

    But when I enter the second, third and so on page the margintop stays the same (5725). What can be de cause of this problem?