Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Workgroup Trigger (VBA/Word/2003)

    I have a need/wish to run some code if the user changes the setting for <font color=blue>Tools > Options > File Locations > Workgroup Templates</font color=blue>. I would accept triggering the code when the user activates any of the points in this pull-down chain (as a second choice). But, I have just about convinced myself that any of the foregoing is an impossible task. Please tell me that I'm wrong.
    Or as an alternative; can someone advise me? Is it worth while delving into the Windows Script Host and scripting languages? I only became aware of WSH moments ago.
    Regards
    Don

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

    Re: Workgroup Trigger (VBA/Word/2003)

    You could hijack the Tools | Options menu item by creating a macro named ToolsOptions (you'd have to display the dialog yourself from this macro), but I don't think that would be very useful. As far as I know, Word VBA does not provide a way to monitor changes to a specific file location.

    If you do a Google search for monitor registry changes you'll find lots of utilities and code examples, but I don't know how to integrate them into Word.

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Workgroup Trigger (VBA/Word/2003)

    Thank you Hans
    <img src=/S/disappointed.gif border=0 alt=disappointed width=15 height=15>
    Regards
    Don

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Workgroup Trigger (VBA/Word/2003)

    Extending Hans's suggestion:
    1) Create a ToolsOptions macro.
    2) User selects ToolsOptions
    3) Your ToolsOptions macro fires
    4) You save the current file locations
    5) You display Word's Tools Options dialog
    6) User makes changes & presses OK/Cancel
    7) You check if any of the locations have changed and respond accordingly.
    HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Workgroup Trigger (VBA/Word/2003)

    Sam
    I Believe that you have hit the nail on the head. I will code this up and let you know how it goes. I had thought this through but didn't recall the availability of a Tools Options Dialog command.
    <img src=/S/hailpraise.gif border=0 alt=hailpraise width=27 height=22>
    Regards
    Don

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Workgroup Trigger (VBA/Word/2003)

    I believe you invoke it with
    <pre>Dialogs(wdDialogToolsOptions).Show</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  7. #7
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Workgroup Trigger (VBA/Word/2003)

    Sam
    <font color=blue> Yesss!!! </font color=blue>
    That's exactly what I needed. Thank you again.
    Regards
    Don

Posting Permissions

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