Results 1 to 5 of 5

Thread: Word Object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149

    Question

    Anybody know how to set the margin in word through the word.application object in vb?

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    Record a macro in Word. set a reference to Word in VB, creat a new instance (Dim objWord as New Word.Application), and copy the recorded macro to your new project.

    You'll need to adapt the copied code of course...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    But then the macro will only be on my machine wouldnt it? I need to deploy this to multiple machines.

  4. #4
    New Member
    Join Date
    Apr 2001
    Location
    UK
    Posts
    8
    ActiveDocument.PageSetup.LeftMargin = InchesToPoints(0.75)

    etc.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width