Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoCorrect VBA Simulation (Word 2000/9.03821 SR-1)

    Sorry, this is the first time I've visited the lounge in months, and due to the search being down, I'll have to post this even if it's been handled before. Is there any way to simulate the AutoCorrect function in VBA? Here's my situation:

    I have a table which was created from another data source that has E-mail addresses (such as JDoe@aol.com) in the third column. The addresses are just plain text and are not hyperlinked, as would automatically happen if you were to type the address manually and space, tab, or return afterwards (which is due to AutoCorrect, more specifically, AutoFormatAsYouType). I would like to get an equivalent in VBA of going to the column, moving to the end of the address, and tabbing to the next cell to automatically create the hyperlink. Just doing a record macro does not accomplish this (it does all the steps, but the AutoCorrect doesn't work).

    There's probably a way to capture the address and then work with Hyperlinks.Add method in VBA, which I've been trying, but there are some complications which I won't go into here. I just wondered if there was a way to make the AutoCorrect feature "kick in" to change the mail address text to a mailto hyperlink (or do any any other AutoCorrect functions, for that matter).

    Any one know of a way to do this? Thanks.

  2. #2
    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: AutoCorrect VBA Simulation (Word 2000/9.03821 SR-1)

    It's actually an AutoFormat option, which means you can do this:

    Format > AutoFormat... > Options...
    Turn on "Internet and network paths with hyperlinks"
    Turn off anything else you don't want done to your document
    Click OK
    Choose either AutoFormat now -or- AutoFormat and review each change
    Click OK

    Hope this helps.

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoCorrect VBA Simulation (Word 2000/9.03821 SR-1)

    That's what I needed! I've still got a couple of issues I'm working through, but I've got the basic concept.

    Thanks for the help!!!

Posting Permissions

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