![]() ![]() ' select all and set paragraph margin to 0 ' In contrast, text cursors are objects used for manipulating text ranges. ' A view cursor object represents the caret visible on screen. Here’s the code: Sub FixMargins(optional doc) Thing I could do was to set them to values based on left and right margin sizes. Upper and lower margin sizes got lost in the conversion completely, so the best I didn’t bother to find out how to fix that in the general case I just added anĮxtra 0.5 cm to the result in order to get the same margin sizes in convertedĭocuments as in the original files (but I removed that code from the macro shown here). WordPerfect’s default happened to be 2.5 cm while OpenOffice’s default was 2 cm. WordPerfect and would be the same - which was not quite right. Paragraph on the page and makes paragraph margins equal zero while enlarging pageĪn extra quirk is that wpd2sxw assumed that default page margins in This macro gets paragraph margin sizes from the first Of course, I wanted to have the more natural 4 cm page margins and no additional Margins stayed at the default 2 cm while the other 2 cm were paragraph margins. Paragraphs had exactly the same left margin sizes (4 cm), in converted documents page Wpd2sxw chose to use both margin types for converted documents. Paragraph margin or any other combination which sums up to 4 cm). Represented in exactly one way in WordPerfect (margin = 4 cm for that The effect of having a paragraph start 4 centimeters from the left page edge can be Separate entities for page and paragraph margins. In contrast, WordPerfect assigns margin sizes to paragraphs - there are no Used in order to have paragraphs with different spacing from the left page edge. OpenOffice, margin sizes are a page property - paragraph indentation has to be WordPerfect handles margins in a slightly different way than does. Object and modifying that style’s properties. Here, setting a page’s property is accomplished by finding the corresponding style Simple as it is, this example demonstrates the extensive use of styles in. OStyle = ("PageStyles").getByName("Default") ODoc = IIf(IsMissing(doc), ThisComponent, doc) To A4 (210×297 mm): Sub SetPageSizeA4(optional doc) This macro sets a document’s default page size Converted documents all defaulted to Letter, while A4 When I converted my WordPerfect documents, wpd2sxw failed to save the page size in the newly created files. Generally, they were designedįor 1.1, but most also work in 1.0 and should work withĭifferent versions of StarOffice as well. Use, so they won’t work with Option Explicit. The Macro dialog box (Tools->Macros->Macro…), which is more or less self-explanatory.įor brevity, the macros listed in this article usually don’t declare variables they 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. To original WordPerfect files they were generated from. 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 by itself does not support reading or writing WordPerfect files, but a tool called wpd2sxw can convert WordPerfect files to format (SXW). Around the time 1.1 RC was released, I was migrating a small company from Corel WordPerfect to. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |