DocLoaded: boolean;
Run-time and read only. DocLoaded is a boolean property that indicates whether a OleanderPrinter has loaded the document specified in DocName.
DbNamesSeparator: char;
The DbNamesSeparator property determines what character separates the datasourcename from the fieldname in an identifier. While parsing the document, Oleander tries to find those identifiers that correspond with a datasource on the Delphi form. If the name of the identifier has the DbNamesSeparator in it, Oleander assumes it to be a database identifier. As Oleander uses WinWord bookmarks to work with WinWord 7, this property defaults to _, because no other special characters are allowed in bookmarks.
Note: For a more explicit description of the identifier name and content syntax look at TOleanderIdentifier and How to create an Oleander document with WinWord 7.
procedure Test; var identifier: TOleanderIdentifier s1: string; s2: string;begin identifier := TOleanderIdentifier.Create; identifier.Name := Customer_Company; if identifier.IsField then {this is TRUE} begin s1 := identifier.DatasourceName; s2 := identifier.DatafieldName; end; identifier.Name := Customer_Company_2; if identifier.IsField then {this is TRUE and allows you to place several bookmarks for the same field} begin ... end; identifier.Name := ApplicationVersionnumber; if identifier.IsField then {this is FALSE, as there is no DbNamesSeparator in the name} begin ... end; end;
Docname: string;
The DocName property contains the name of the document to load and print.
DocReadonly: boolean;
The DocReadonly property is a boolean property that indicates how WinWord 7 should load the document specified in DocName. If set to True it will be loaded readonly, if set to False the user can modify the document during the Oleander print process.
Identifiers: TOleanderIdentifiers;
Run-time and read only. The Identifiers property returns a specific identifier in the document. Specify the identifier using the Index parameter. Index values start at 0. The range for Index is 0..Identifiers.Count - 1. The Identifiers are sorted with the identifierers in the header followed by the identifiers in the footer and then in the body of the document.
procedure TForm1.OleanderWord7AfterLoadDoc(Sender: TObject); begin Listbox1.items.Clear; for i := 0 to OleanderWord7.Identifiers.Count-1 do Listbox1.items.Add(OleanderWord7.Identifiers[i].AsString); end;
MaskSeparator: char;
The MaskSeparator property determines wich character separates the field format mask in the identifier contents. This property defaults to @. When inserting a bookmark in a WinWord7 document, this bookmark needs not to have a content, Oleander works with the name of the bookmark. But usually you will type in what field this bookmark represents. If you do so, you can insert a formating mask in the contents, too. This mask has to be at the end of the contents, separated by the MaskSeparator character. Different field types may have different format masks.
Note: For a more explicit description of the identifier name and content syntax look at TOleanderIdentifier and How to create an Oleander document with WinWord 7.
Printername: string;
The PrinterName property contains the name of the printer that the document should be printed on. This should be a printername that WinWord7 understands, and that is not easy to accomplish. Just reading the pritners from the Delphi Tprinter object does not give a proper printername for WinWord7. To circumvent this problem, we added two procedures in the OleanderTools unit, to help you. The function RegistryPrinterNames delivers a WIN95 or WinNT registry based list of printers in a Tstringlist. The function MapWord7Printer takes a name out of this list and creates a proper WinWord7 name out of it. This name is language depended!
procedure TForm1.FormCreate(Sender: TObject); begin ComboBox1.Items.Assign(RegistryPrinterNames); end;procedure TForm1.ComboBox1Change(Sender: TObject); begin case OleanderWord7.WordbasicDialect of wbdGerman : OleanderWord7.Printername := MapWord7Printer(ComboBox1.Text, ' an '); wbdEnglish: OleanderWord7.Printername := MapWord7Printer(ComboBox1.Text, ' on '); end; end;
ShowServer: boolean;
Run-time only. The ShowServer property toggles the visiblility of the OLE server application. Set to True shows the application on screen, set to False hides it.
procedure TForm1.Checkbox1Click(Sender: TObject); begin OleanderWord7.ShowServer := Checkbox1.Checked; end;
UseRunningServer: boolean;
The UseRunningServer property is a boolean property that indicates wether an already running WinWord7 should be used by Oleander or a new instance of WinWord7 should be loaded. If set to True Oleander will look for a running WinWord7 and use it to print. After print this running instance will be in the state Oleander found it before the print. All documents used by Oleander will be freed but it can not be closed by Oleander. An instance of WinWord7 created by Oleander will be freed from memory after printing.
Version: string;
Read only. The Version property contains the versionnumber of the TOleanderWord7 component.
WordbasicDialect: TWordbasicDialect;
The WordbasicDialect property contains the language version of WinWord7 installed on your system. The wordbasic commands used to program WinWord7 via OLE are language dependant. So there has to be a special adaptation of TOleanderWord7 for every language. So far the ENGLISH and GERMAN versions of WinWord7 are supported. Other languages can easily be added if the translations of the wordbasic commands will be available to us.
Note: This properties applies only to the TOleanderWord7 component.