Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Location
    San Leandro, California, USA
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA WORD - end macro in Doc Properties box (WORD 2000 - VBA)

    Can someone help me? What VBA code shoud I use to have a macro end with the Document Properties box displayed?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA WORD - end macro in Doc Properties box (WORD 2000 - VBA)

    The Word VBA gurus will probably come up with a real answer.

    I don't know of a way to display the complete dialog. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    You can show parts of it:

    Dialogs(wdDialogFileSummaryInfo).Show

    displays part of the summary info , and

    Dialogs(wdDialogDocumentStatistics).Show

    displays part of the document statistics.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: VBA WORD - end macro in Doc Properties box (WORD 2000 - VBA)

    Hi,
    I think what you need is:
    WordBasic.FileProperties
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    New Lounger
    Join Date
    Jun 2002
    Location
    San Leandro, California, USA
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA WORD - end macro in Doc Properties box (WORD 2000 - VBA)

    Rory,
    Thanks so much! It isexactly what I need to do!
    <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: VBA WORD - end macro in Doc Properties box (WORD 2000 - VBA)

    When you need to "run" a menu item that isn't directly accessible through VBA, and you don't need to intercept the results, you can also use this technique:

    CommandBars("Menu Bar").Controls("File").Controls("Properties").Exec ute

    Advantage: Supposedly there is some overhead to loading the WordBasic object. This would avoid that.
    Disadvantage: Menu items shift around between versions and if the user has customized the menus.

    To address the latter point, there is this:
    1. <LI>Determine the command ID using the Immediate window and this query:

      ?CommandBars("Menu Bar").Controls("File").Controls("Properties").Id

      which returns 750

      <LI>Invoke the command using:

      CommandBars.FindControl(ID:=750).Execute
    Of course, that will fail if the user has completely removed the command from the menus. <sigh>

Posting Permissions

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