Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Word 2007 VBA: To simply dock a form to a document window?

    Hi all,

    Word 2007/2010: Can you use VBA to simply dock a form to a document window?

    Or is the only way to use some complex maths with screen res etc to simulate this?

    TIA

    -avraham

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    Are you talking about a vba userform?

    If so, do you want this to appear over the top of your document window and hide the lot or sit aligned left/middle/top/bottom etc?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #3
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi Andrew,

    Thanks for the response.

    Sorry it has taken a while to get back. My wife gave birth a short while ago.

    >> Are you talking about a vba userform?

    Yes.

    >> If so, do you want this to appear over the top of your document window and hide the lot or sit aligned left/middle/top/bottom etc?

    I want the vba form sit to aligned to left/right of the Word doc app window.

    Thanks,
    avraham



  5. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    Congratulations on the new baby

    I was just having a play around and something like this seems to work

    Me.Width = Application.ActiveWindow.Width - 10
    Me.Left = Application.ActiveWindow.Left + 5

    You may need to play around with the offset values which appear to be related to the window border width but may be more complicated than that.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #5
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi Andrew,

    Yes, I also played with the positioning like that. And it worked well enough on one screen. But clients often have two screens. The maths gets more complicated. I wondering if anybody has something ready packaged.

    -avraham

Posting Permissions

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