Beiträge von RoyLambert

    Julian

    I'm using your label demo as a basis but I'm having some trouble with setting things as I want. In addition to setting the WPSuperprint dimensions and margins I'm trying to set the label document margins so that I can place the text nicely in the middle of the label rather than starting at the top left corner.

    It works BUT if I alter the WPSuperPrint margins etc after setting the page margins the left page margin is retained but the top page margin is reset to 0. The code I'm using is

    Code
    procedure TLabelSetupForm.ColCountChange(Sender: TObject); function MMasTwips(Value: Extended): integer; begin  Result := round(Value * MMToTwips); end;begin if FLocked then exit; WPSuperPrint1.PageWidth := MMasTwips(PageWidth.Value); WPSuperPrint1.PageHeight := MMasTwips(PageHeight.Value); WPSuperPrint1.Rows := Trunc(RowCount.Value); WPSuperPrint1.Columns := Trunc(ColCount.Value); WPSuperPrint1.MarginTop := MMasTwips(TopMargin.Value); WPSuperPrint1.MarginLeft := MMasTwips(LeftMargin.Value); WPSuperPrint1.MarginRight := MMasTwips(RightMargin.Value); WPSuperPrint1.MarginBottom := MMasTwips(BottomMargin.Value); WPSuperPrint1.InbetweenHorz := MMasTwips(HorzMargin.Value); WPSuperPrint1.InbetweenVert := MMasTwips(VertMargin.Value); DemoLabel.SelectAll; DemoLabel.Header.SetPageWH(WPSuperPrint1.Width, WPSuperPrint1.Height, MMasTwips(LabelLeft.Value), MMasTwips(LabelTop.Value), 0, 0); Demolabel.HideSelection; DemoLabel.ReformatAll(False, True); end;

    If I reset the top margin it all works again

    Any suggestions?

    Julian

    I'm trying out WPSuperPrint and labels. In order to save paper and ink I decided to use PDF995 ("prints" a pdf to a file).

    Unfortunately WPSuperPrint doesn't work with PDF995. Any suggestions (apart from buying your pdf product <g>)

    I'm working on this using

    Code
    if Document.BookmarkSelect('Address', true) then begin  Address.AsString := Document.SelectionAsString;  Address.HideSelection;  Address.Refresh; end;

    for the first label and

    Code
    if Document.BookmarkSelect('Address', true) then begin
      Address.CPPosition := MaxInt;
      Address.InputString(#12);
      address.ActivePar.LoadFromString(Document.SelectionAsString, 'RTF','',[wploadpar_UseWritingAttr]);
      Address.HideSelection;
      Address.Refresh;
     end

    for subsequent labels. It almost works. The problem is that on second and subsequent labels the first CR is lost eg

    Line1
    Line2
    Line3

    becomes

    Line1Line2
    Line3

    Any suggestions?

    Julian

    Thanks for the info, but as a hobby programmer that's out of my price range.

    Looking through your demos I eventually decided to wrap the address in a bookmark. Works nicely. My next stage is to pretty up the label dimension part of your label demo to match the general look and appearance of my app.

    Roy

    Julian

    I decided that I'd go for the first block of left aligned text (that should allow me to print my letterhead) but I'd like to keep the bolding, colour etc (if any) in the address.

    Your approach

    apar := WPRichText1.BodyText.AppendNewPar;
    apar.SetText(TRIM(par.ANSIText));
    apar.ASet(WPAT_IndentLeft, 72);
    apar.ASet(WPAT_IndentRight, 72);

    doesn't do this and I can't figure out how to copy the attributes.

    Roy

    I already use that feature to create mailshot letters and eShots (ie emailshots) but as I said above there may be user entered text (ie not mergefields), and the address may not be the first thing in the letter.

    My system allows users to specify the merge fields they want to use so I can't just pick up on the basis of certain merge fields. I don't want a separate document because that could lead to different addresses on the letter and label.

    I suppose what I'm looking for is something like the textbox in Word as long as it can have mailmerge fields.

    Julian

    I will be using merge fields to create the address block, but I have no way of knowing which bit of text it is (even if its in a table). Is there something that can be used to pick out a specific block of text from a document AFTER the mail merge has been carried out. Its possible that the address block could contain some text that has been typed in directly (eg Private & Confidential) as well the merged fields

    Roy

    What is the best way to mark an address block in a letter so that I can pick it up as the address as part of a mail merge operation?

    I've had a look at the label demo but probably won't be able to use that as some people will want to use the mail merge templates to print their letter head so I can't rely on the recipients address being the first thing on the letter.

    Julian

    I'm also a hobby programmer. I've owned a STD licence for V3, V4, V5 and now V6. What would it cost me to upgrade to a unicode enabled version? I ask because I can't spot it on your upgrades page. It might be there I just can't spot it.