Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-31-2014, 01:18 AM
charm charm is offline Store and Apply position of an Object Windows XP Store and Apply position of an Object Office 2007
Novice
Store and Apply position of an Object
 
Join Date: Oct 2014
Posts: 4
charm is on a distinguished road
Default Store and Apply position of an Object

Hello VBA experts,

I had a very tough time repositioning objects on the slides so that they all look at same place on all slides. Just wondering if it is possible with VBA. However I am new to VBA programming.

Is it possible to store the position (x,y coordinate) of selected object with a macro1 and apply it on any other object on any other slide by running macro2??



Thanks in advance.
Charm
Reply With Quote
  #2  
Old 10-31-2014, 01:30 AM
JohnWilson JohnWilson is offline Store and Apply position of an Object Windows 7 64bit Store and Apply position of an Object Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Not difficult in vba but Steve Rindsberg has a free addin that will do this and more

http://www.pptools.com/starterset/index.html
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 10-31-2014, 03:37 AM
charm charm is offline Store and Apply position of an Object Windows XP Store and Apply position of an Object Office 2007
Novice
Store and Apply position of an Object
 
Join Date: Oct 2014
Posts: 4
charm is on a distinguished road
Default

Hi John,

I tried to download the demo version, but my anti virus is not allowing me to do so...

Thanks anyway.

Cheers,
Charm
Reply With Quote
  #4  
Old 10-31-2014, 05:20 AM
JohnWilson JohnWilson is offline Store and Apply position of an Object Windows 7 64bit Store and Apply position of an Object Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Maybe you need to think about changing the virus checker! Starter Set doesn't really have a demo there's a free version so are you sure you went to the correct place. I know the PPTools people and can vouch for them as safe.

To do it yourself:

Code:
Dim sngL As Single
Dim sngT As Single

Sub PickUpPosition()
On Error GoTo err
With ActiveWindow.Selection.ShapeRange(1)
sngL = .Left
sngT = .Top
End With
Exit Sub
err:
MsgBox "There's an error maybe you didn't select a shape", vbCritical
End Sub

Sub ApplyPosition()
On Error GoTo err
With ActiveWindow.Selection.ShapeRange(1)
.Left = sngL
.Top = sngT
End With
Exit Sub
err:
MsgBox "There's an error maybe you didn't select a shape", vbCritical
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 10-31-2014, 05:39 AM
charm charm is offline Store and Apply position of an Object Windows XP Store and Apply position of an Object Office 2007
Novice
Store and Apply position of an Object
 
Join Date: Oct 2014
Posts: 4
charm is on a distinguished road
Default

Thanks so much for the code, John...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Store and Apply position of an Object How do I store themes? Katarina Word 1 05-22-2014 05:14 AM
Store and Apply position of an Object Placing the same object/picture on all pages but on alternative (mirror position) - alceste Drawing and Graphics 1 09-29-2013 06:28 PM
Store and Apply position of an Object Store the code ubns Misc 1 05-01-2012 01:55 AM
parse, store and email a .tmp file from wordpad? scadaman29325 Office 0 09-28-2010 04:56 PM
Problem: object library invalid or contains references to object definitions aligahk06 Office 0 08-19-2010 12:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:19 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