home *** CD-ROM | disk | FTP | other *** search
/ Techno Guide - Aspettando Windows 98 / TechnoGuide.iso / applicaz / snotetab / sample.tpl < prev    next >
Text File  |  1998-01-25  |  2KB  |  13 lines

  1. = DocTemplate "Notes%0.3d.txt"
  2. A template is a special kind of document that provides content for shaping a new document. You can use several templates to save time in creating many common types of documents.
  3.  
  4. Unless you have chosen the "Template|Edit" menu command, you will see the above definition at the top of a new document with the name "Notes001.txt" (unless you have already created files with this name). The content of this new document is based on the text in the template you just opened.
  5.  
  6. Templates are slightly different from normal documents in that there first line contains the template header definition. The header informs NoteTab that the file being opened is a template; it can also tell NoteTab what name it should generate for the new document. For example, the header of this documents template looks like this:
  7.  
  8. = DocTemplate "Notes%0.3d.txt"
  9.  
  10. Headers must always start with an equal (=) sign as the first character on the line followed by the word "DocTemplate" (case is not important). After that first part, you can add the text format that NoteTab should use to generate the names of documents based on the template. This information is optional and must be enclosed in double quotes (") when used. The code "%d" indicates where the incremental numbering is inserted in the name. In the above example, the "0.3" between the % and d tells NoteTab to format numbers smaller than 3 digits with leading zeroes. If you ommit the extension, the currently defined default extension will be added when the name is generated. You can also include a path name if you always want the documents saved in the specified directory.
  11.  
  12. Add this type of header on the first line of any document and it will become a template once you save it. Then, whenever you open it through the File|Open or File|Template|Open menu command, a new document based on your template will be created. If you need to modifiy the content of a template, use the File|Template|Edit menu command.
  13.