Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Allowing autotexts with Enter Keybinding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tweek - 09 Dec 2004 20:07 GMT
Hi all,

I'm using a KeyBinding to remap the Enter key to call a macro in a
template I'm working on. Unfortunately, this prevents Autotexts from
working as expected. Specifically, when the tooltip pops up on the
screen displaying the Autotext detected and says "Press Enter to
insert", the Autotext isn't inserted when Enter is pressed.

Is there any way to programmatically detect if this tooltip is being
displayed when my macro gets called? Or will I have to write the logic
to determine if there is an autotext code to the left of the cursor
when the enter key is pressed and replace it with the text?
Thanks much!
Charles Kenyon - 09 Dec 2004 20:35 GMT
You can use the F3 key instead of Enter to insert the AutoText. Not quite as
nice, but I would expect multiple problems binding a macro to the Enter key!
Why not use Alt-Enter or one of the function keys instead?
Signature


Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Hi all,
>
[quoted text clipped - 9 lines]
> when the enter key is pressed and replace it with the text?
> Thanks much!
Tweek - 10 Dec 2004 19:53 GMT
I'm attempting to prevent users from using empty paragraphs to create a
line space between paragraphs. When the editor presses enter, the macro
checks to see if the previous paragraph is empty. If it is, it changes
the style of the paragraph to a style I've created called "Body Text
Space Above".

Since remapping the enter key seems problematic, I am now considering
creating a "preflight" macro which will run when the editor finishes
their document instead. It would go and look for the empty paragraphs,
delete them, and change the following paragraph to the "Space Above"
style. My goal is to try not to make too many changes to the way the
users work.

Any other suggestions?
Jean-Guy Marcil - 10 Dec 2004 20:09 GMT
Tweek was telling us:
Tweek nous racontait que :

> I'm attempting to prevent users from using empty paragraphs to create
> a line space between paragraphs. When the editor presses enter, the
[quoted text clipped - 10 lines]
>
> Any other suggestions?

Why not create a basic style that includes a space after? This way users
will not have to hit Enter twice to get a space between paragraphs. If they
do, they will end up with a much too large and will learn to stop hitting
Enter twice after having to backspace every time... I think in the long run
it pays to educate users a bit.

If your case is hopeless, then, you can hijack the save event by creating
FilseSave and FileSaveAs macros (With those exact names) that will wither
just save the document or call the Save As dialog, but that will also call a
sub that does the job you need to do before saving the document. This way,
whenever the file is saved, it will be checked automatically. IN the
FileSaveAs sub, you might want to check if the users has cancelled the
operation before making any changes.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.