Solved

In Microsoft Word, what is autocorrect VBA equivalent.

Posted on 2014-01-18
2
510 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
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…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 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