Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    0
    Thanked 1 Time in 1 Post

    VBA to Launch Autocorrect dialogue

    I'm familiar with adding autocorrect entries using the application.autocorrect.add method.

    What I want to know is if there is any way use VBA to:

    * launch the autocorrect dialogue
    * stuff keystrokes in the buffer (send keys?) to load an auto correct entry
    * Let the user make changes before they hit save

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Do you mean something like:
    Code:
    Sub Demo()
    With Application.Dialogs(wdDialogToolsAutoCorrect)
      SendKeys "%rhello%wgoodbye"
      .Show
    End With
    End Sub
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Feb 2014
    Posts
    14
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi Paul

    Thanks so much for this insight. The call to the correct dialogue was just what I was looking for.

    The way to do this has opened up a whole range of opportunities for me too.

    I have elected to use the general statement: sendkeys "abbreviation{TAB}fulltext"

    I am working on a range of productivity tools for Word (see signature) and will incorporate your guidance.

    Many Thanks. From my perspective this thread can be marked solved

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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