Solved

In Microsoft Word, what is autocorrect VBA equivalent.

Posted on 2014-01-18
2
524 Views
Last Modified: 2014-01-18
With regard to Microsoft Word, I have read in these forums that the spacebar by itself cannot be used to launch a macro.

But, isn't that what autocorrect does?  You can add a key board abbreviation like "txt" and its replacment, "replacement text" to the autocorrect dictionary/library. Then, while in the document, typing "txt" and hitting spacebar does the replacement while keeping the usual functionality of the spacebar as you go.

What is going on from a VBA coding perspective?
0
Comment
Question by:rreiss60
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 400 total points
ID: 39790775
Basically, nothing. The only thing that runs is Word's internal coding in the .exe or a .dll.

Generally VBA sits outside of Word. However the Word designers have provided access to some of the Word objects, properties, methods and events.

It is possible to use VBA to run the methods on the applicable properties of an object. It is also possible to use an event to start a macro procedure. But, as we have said before, there is no event available for typing into a document, so no macro can be started.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39791135
Thanks.

Since that answer, I did some further research. I don't have VSTO (I can't afford it) so I tried searching to see if it can do any better.

As you will see from this link:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/f3ce678b-946c-4995-9b50-2b6d8b9fd8ba/vsto-event-for-word-documents-contenttext-changes?forum=vsto
it seems not, but the page points to using Windows API calls. These can be used in VBA, but as it might get rather difficult, I haven't yet been any further.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question