Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 03-10-2015, 08:20 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

After doing some more research (stumbling upon a relevant search string, to tell the truth) it seems that Add-ins can contribute to the behavior I have described. I will go through my Add-ins to see if I can identify a culprit. There is a kb article on the topic (921541), but it only describes tracking down the Add-in, and not what changes need to be made with that Add-in. It also seems to assume that Add-ins come from third party vendors (it advises to "contact the vendor of the add-in for an update"). I use Add-ins for styles and macros, and leave the Normal template alone for the most part. I could probably do away with the styles Add-in, since I can retrieve the styles from a template, or else switch the document's basis to that template.
Reply With Quote
Reply

Thread Tools
Display Modes


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 05:12 AM.


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