In OpenOffice, margin sizes are a page property - paragraph indentation has to be used in order to have paragraphs with different spacing from the left page edge. WordPerfect handles margins in a slightly different way than does. Here, setting a page's property is accomplished by finding the corresponding style object and modifying that style's properties. Simple as it is, this example demonstrates the extensive use of styles in. OStyle = ("PageStyles").getByName("Default") ODoc = IIf(IsMissing(doc), ThisComponent, doc) This macro sets a document's default page size to A4 (210x297 mm): Converted documents all defaulted to Letter, while A4 was used in the original files. When I converted my WordPerfect documents, wpd2sxw failed to save the page size in the newly created files. Generally, they were designed for 1.1, but most also work in 1.0 and should work with different versions of StarOffice as well. ![]() For brevity, the macros listed in this article usually don't declare variables they use, so they won't work with Option Explicit. You can edit and run macros in through the Macro dialog box (Tools->Macros->Macro.), which is more or less self-explanatory. You can find tutorials and general information regarding StarBasic macros, along with information on scripting, elsewhere on the Web. I won't go into details of the language itself, but the examples given here should be easy to understand if you have some programming experience. This article presents some macro "building blocks" you can use to modify a document's formatting or to generate well-formatted documents from plain text files. After conversion with wpd2sxw, which was rather good but had problems with some formatting features, I applied macros to documents based on different templates to make more than 2,000 converted documents look very similar to original WordPerfect files they were generated from. by itself does not support reading or writing WordPerfect files, but a tool called wpd2sxw can convert WordPerfect files to format (SXW). Resulting from loss of use, data or profits, whether in an action ofĬontract, negligence or other tortious action, arising out of or inĬonnection with the use of this document.įormatting documents with Writer macrosĪround the time 1.1 RC was released, I was migrating a small company from Corel WordPerfect to. Special, indirect or consequential damages or any damages whatsoever Including all implied warranties of merchantability and fitness for aĬertain purpose in no event shall the author be liable for any ![]() The author disclaims all warranties with regard to this document, Code samples in this article are hereby put in the public domain.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |