Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-09-2015, 05:33 AM
BruceM BruceM is offline Macros to move objects prevents moving same objects with arrow keys Windows 7 64bit Macros to move objects prevents moving same objects with arrow keys Office 2010 32bit
Advanced Beginner
Macros to move objects prevents moving same objects with arrow keys
 
Join Date: Feb 2015
Posts: 41
BruceM is on a distinguished road
Default Macros to move objects prevents moving same objects with arrow keys


I make frequent use of macros stored in an Add-In to perform various actions with text boxes and other graphic elements. I have a custom ribbon tab for macros, with the macros added as buttons on the ribbon.

An example is centering a graphic:

Code:
 
Public Sub CenterGraphic()

  Selection.ShapeRange.Left = wdShapeCenter
 
End Sub
After running the macro I can no longer use the arrow keys to nudge the object. If I move the object with the mouse, I can then use the arrow keys to nudge it, but immediately after running the macro the arrow keys will not move the graphic.

The code above is very simple, and perhaps I could find a button to put onto a ribbon to accomplish the same thing. However, other macros are a little more involved. One that I use often wraps the text top and bottom, with user prompts (input boxes) for the distance. The default is 1, which is 0.1 inches, but other values can be chosen as needed. After running that macro I cannot nudge the graphic with the arrow keys. In some situations I cannot set the size from the ribbon, either, but I can set it from the More Layout Options dialog. I haven't quite sorted out all of the variants of what does and doesn't work under various scenarios, but I do know that running a macro that performs an action on a graphic sometimes overrides the ability to perform keyboard and ribbon actions on the same graphic. It always overrides the use of arrow keys to move the graphic.

This only happens with docx files. With doc files, running the macro does not have the effect I have described.

Any ideas on what is happening here?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't move objects with precision MLF PowerPoint 3 07-31-2014 04:03 AM
Macros to move objects prevents moving same objects with arrow keys Convert equation objects to inline objects sumjoh Word VBA 1 01-29-2013 08:38 PM
Macros to move objects prevents moving same objects with arrow keys Arrow keys move the caret to opposing direction with the Arabic keyboard. Why ? Belloc Word 4 05-27-2012 07:31 AM
Using arrow keys to move between pages Gidday Word 0 03-27-2012 04:05 PM
Visio: moving objects with arrows on keyboard plvachon Visio 0 07-18-2010 07:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:02 PM.


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