Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2019, 06:14 PM
eduzs eduzs is offline Reset shape/inlineshape axis after rotation? Windows 10 Reset shape/inlineshape axis after rotation? Office 2010 32bit
Expert
Reset shape/inlineshape axis after rotation?
 
Join Date: May 2017
Posts: 262
eduzs is on a distinguished road
Default Reset shape/inlineshape axis after rotation?

Is there a way to set the axis the shape/inlineshape axis after a rotation?
When I "increment rotate" (90º) a shape width and height be inverted.
The only way I know is to copy the shape and paste as a new image.
Thanks


Quote:
With doc.Shapes(1)
.IncrementRotation (Rot)
.ConvertToInlineShape
.Select
End With
With Selection
.Copy
.Delete


.PasteSpecial DataType:=14
End With
__________________
Backup your original file before doing any modification.

Last edited by eduzs; 05-04-2019 at 03:50 AM.
Reply With Quote
  #2  
Old 05-04-2019, 03:06 PM
macropod's Avatar
macropod macropod is online now Reset shape/inlineshape axis after rotation? Windows 7 64bit Reset shape/inlineshape axis after rotation? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What do you mean by "Is there a way to set the axis the shape/inlineshape axis after a rotation"? What axis?

The basic code to rotate an InlineShape is:
Code:
Sub Demo()
Dim Shp As Shape
With ActiveDocument
  Set Shp = .InlineShapes(1).ConvertToShape
  With Shp
    .Rotation = 90
    .ConvertToInlineShape
  End With
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-05-2019, 04:14 AM
eduzs eduzs is offline Reset shape/inlineshape axis after rotation? Windows 10 Reset shape/inlineshape axis after rotation? Office 2010 32bit
Expert
Reset shape/inlineshape axis after rotation?
 
Join Date: May 2017
Posts: 262
eduzs is on a distinguished road
Default

Hi! Thank you!
Is there any difference between "rotation" and "incrementrotation"?
I'll explain better:
For example, when I apply a 90 ° clockwise rotation, the rotation handle (small green dot) that is originally at the top of the shape goes to the right side of the shape.
This means that if I change the width of the shape, I will actually be altering the height.
__________________
Backup your original file before doing any modification.
Reply With Quote
  #4  
Old 05-05-2019, 01:54 PM
macropod's Avatar
macropod macropod is online now Reset shape/inlineshape axis after rotation? Windows 7 64bit Reset shape/inlineshape axis after rotation? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Neither .Rotation nor .IncrementRotation changes the image's logical top & sides. Why do you believe you need to do that?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 05-05-2019, 03:48 PM
eduzs eduzs is offline Reset shape/inlineshape axis after rotation? Windows 10 Reset shape/inlineshape axis after rotation? Office 2010 32bit
Expert
Reset shape/inlineshape axis after rotation?
 
Join Date: May 2017
Posts: 262
eduzs is on a distinguished road
Default

No need, copy, delete and paste as a new image also works.
It's because is difficult to set height and width within VBA when they shape is rotated.
Thanks.
__________________
Backup your original file before doing any modification.
Reply With Quote
  #6  
Old 05-05-2019, 03:52 PM
macropod's Avatar
macropod macropod is online now Reset shape/inlineshape axis after rotation? Windows 7 64bit Reset shape/inlineshape axis after rotation? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could, of course do that adjustment before or after rotating it - all you need do is keep the orientation in mind so you know axis which you're working with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Visio 2007 Can't rotate building door shape, No handle for rotation themurf47 Visio 1 02-21-2018 07:03 AM
Reset shape/inlineshape axis after rotation? How to read an inlineshape which is stored in a table cell dherr Word VBA 1 01-11-2018 07:23 PM
my excel 2010 line chart has a secondary axis. Its horizontal date axis is incorrect. jalea148 Excel 3 01-06-2017 09:04 AM
VBA to change shape rotation gebobs Excel Programming 4 09-06-2014 07:47 AM
Secondry Axis overlapping in bar chart dual axis in Powerpoint 2010 sharath_ms PowerPoint 0 07-08-2013 10:06 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:36 PM.


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