Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Word margins through OLE
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00192747
Message ID:
00192996
Views:
20
Kevin,

Use the Document.PageSetup object:
   this.moWord = createobject( "word.application" )
   this.moWorkOrder = this.moWord.Documents.Add( fullpath( "work order.dot" ) )
   with this.moWorkOrder.PageSetup
      .LeftMargin   = this.moWord.InchesToPoints( 0.5 )
      .RightMargin  = this.moWord.InchesToPoints( 0.5 )
      .TopMargin    = this.moWord.InchesToPoints( 0.3 )
      .BottomMargin = this.moWord.InchesToPoints( 0.3 )
   endwith
>Can anyone tell me how to set the margins
>in a Word 97 document using OLE automation?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform