LabelDef Property

[Top]  [Chapter]  [Previous]  [Next]

Interface to display labe sheet and change label setup

Declaration

IWPLabelDef LabelDef;

 

Description

Using the LabelDef interface you can quickly print labels. It is also possible to preview the label sheets just like they would be printed. It is even possible to edit the text on the label sheets. You can also specify the lablel number to start with. All parameters of a label can be specified, using CM or Inch values.

labeldef

This C# code copies the current text (it expects this to be an address, about 5 lines) 30 times - each one on a new page. Then it activates the other text and activates the label display for this text.

 

private void LabelEdit_Click(object sender, System.EventArgs e)

{

 LabelEdit.Checked = !LabelEdit.Checked;

 if (LabelEdit.Checked)

 {

  // Delete the label text

  wpdllInt1.Memo.RTFDataDelete("LABELS");

  // Make 30 copies

  for (int i = 0; i < 30; i++)

  {

  wpdllInt1.Memo.RTFDataAppendTo("LABELS", true);

  }

  // and display the label sheet

  wpdllInt1.Memo.RTFDataSelect("LABELS");

  // and activates label display

  wpdllInt1.Memo.LabelDef.Caption = "WPCubed GmbH";

  wpdllInt1.Memo.LabelDef.Active = true;

 }

 else

 // switch back to normal text

 wpdllInt1.Memo.RTFDataSelect("@@FIRST@@");

}

 

Category

Mailmerge


[idh_iwpmemo_labeldef.htm]    Copyright © 2007 by WPCubed GmbH