4.5 Formatting

Formatting

If all we could do was send text to Word and read the text that s already there, Automation would be useful, but not worth too much trouble. However, there s much more to automating Word than just sending and receiving text. One of the big benefits of using Word rather than VFP is the ability to apply complex formatting to documents.

Word allows documents to be formatted in a number of ways, and the objects available for formatting reflect the way Word structures its commands. For example, the Font object contains properties for the settings found in Word s Font dialog (Format|Font on the menu). The ParagraphFormat object controls the settings found in the Paragraph dialog, such as indentation, spacing, and alignment. Similarly, the settings from the Page Setup dialog are controlled by the PageSetup object. Style objects represent the preformatted and user-defined styles available in the document. These four objects manage most of the frequently used settings. Other objects control other aspects of formatting.

 

Copyright 2000 by Tamar E. Granor and Della Martin All Rights Reserved



Microsoft Office Automation with Visual FoxPro
Microsoft Office Automation with Visual FoxPro
ISBN: 0965509303
EAN: 2147483647
Year: 2000
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net