Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2018, 10:20 AM
amz1950 amz1950 is offline Problems with Macro for inserting autotext when autotext name isn't followed by a space Windows 7 64bit Problems with Macro for inserting autotext when autotext name isn't followed by a space Office 2013
Novice
Problems with Macro for inserting autotext when autotext name isn't followed by a space
 
Join Date: Feb 2018
Posts: 3
amz1950 is on a distinguished road
Default Problems with Macro for inserting autotext when autotext name isn't followed by a space

One thing that drives me nuts about Word, compared with the late-lamented (at least by me as to certain features) Word for Dos, is that if you have the name of an autotext entry followed without spaces by other text (as often happens when you are editing), then hitting F3 doesn't work; it looks to the entire word instead of just the text to the left of the cursor (the latter is what Word for Dos did).



So using the record feature, I created a macro to use after I've typed the autotext name; it inserts a space, moves the cursor left one space to the end of the autotext name, then tells Word to insert the autotext. I have a keyboard control so I just type control J to invoke the macro, instead of F3, and it works fine overall.

EXCEPT - if I'm in revision marks mode, after inserting the text, the cursor jumps to the left of the text instead of staying where it is. So I have to control right arrow (perhaps several times, if the inserted text is multiple words) to get it back to after the inserted text, undoing much of the efficiency of having autotext. I tried to replicate this not using the macro, just inserting a space in revision marks mode, hitting left arrow, hitting F3, but then it doesn't do the "jump to the left" bit.

Any thoughts on how to keep the cursor where it belongs, i.e. at the end of the inserted text.

Here's the macro that was created by my record:

Sub eff3equiv()
'
' eff3equiv Macro
'
'
Selection.TypeText Text:=" "
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Range.InsertAutoText
End Sub.

Thank you for any thoughts on a solution (or instead, on a different solution to the problem).
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Macro for inserting autotext when autotext name isn't followed by a space Using autotext automatically Thedane Word 5 11-19-2014 09:00 PM
Problems with Macro for inserting autotext when autotext name isn't followed by a space How do I edit AutoText? TommyVincent Outlook 2 08-01-2014 08:20 AM
Formatting Issues When Using If Statements and Inserting Building Blocks/Autotext sanko787 Mail Merge 1 07-05-2014 09:00 PM
Problems with Macro for inserting autotext when autotext name isn't followed by a space Autotext jafrapatty Word 2 05-09-2014 04:30 AM
Problems with Macro for inserting autotext when autotext name isn't followed by a space Inserted AutoText table incorrectly formatted - unless macro paused! Smallweed Word VBA 4 01-16-2014 03:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft