Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2014, 11:26 PM
YJPark YJPark is offline How to set table's Name properties. (Powerpoint 2010 VBA) Windows 7 64bit How to set table's Name properties. (Powerpoint 2010 VBA) Office 2010 32bit
Novice
How to set table's Name properties. (Powerpoint 2010 VBA)
 
Join Date: Jul 2014
Posts: 2
YJPark is on a distinguished road
Smile How to set table's Name properties. (Powerpoint 2010 VBA)

Hi. I want to control shapes with it "Name" properties. (Actually, I don't know there's better way. TT)

For example, I planning to make some Table with Some hotkeys. The point is, The Table should have it Name properties (eg. "Red Square").
Because I want to manipulate it with its Name when I press another hotkey.

I already know that i could give its name, if it is a shape, like this.

Set myDocument = ActivePresentation.Slides(1)With myDocument.Shapes.AddShape(Type:=msoShapeRectangle , _
Top:=144, Left:=144, Width:=72, Height:=72)
.Name = "Red Square"
End With

And I can manipulate it.
For example, I could delete it, like this.

ActivePresentation.Sildes(1).Shapes("Red Square").Delete

However, I really don't know how can I give its name with Table.

Please help me!
Reply With Quote
  #2  
Old 07-07-2014, 11:37 PM
JohnWilson JohnWilson is offline How to set table's Name properties. (Powerpoint 2010 VBA) Windows 7 64bit How to set table's Name properties. (Powerpoint 2010 VBA) 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

Pretty much the same

Dim myDocument As Slide
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
.Name = "Red Square"
End With

However I hate myDocument being used to refer to a slide (I know it comes from Microsoft help but it's wrong - slides are not documents)

Sub addTable()
Dim mySlide As Slide
Dim myTable As Shape
Set mySlide = ActivePresentation.Slides(1)
Set myTable = mySlide.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
myTable.Name = "Red Square"
End Sub

You will find it difficult to use hotkeys in PPT BTW.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 07-08-2014 at 12:54 AM.
Reply With Quote
  #3  
Old 07-08-2014, 01:21 AM
YJPark YJPark is offline How to set table's Name properties. (Powerpoint 2010 VBA) Windows 7 64bit How to set table's Name properties. (Powerpoint 2010 VBA) Office 2010 32bit
Novice
How to set table's Name properties. (Powerpoint 2010 VBA)
 
Join Date: Jul 2014
Posts: 2
YJPark is on a distinguished road
Default WoW, Perfect!! :)

I really really appreciate your help T.T. Thank you so much!!
It works Perfectly.
Quote:
Originally Posted by JohnWilson View Post
Pretty much the same

Dim myDocument As Slide
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
.Name = "Red Square"
End With

However I hate myDocument being used to refer to a slide (I know it comes from Microsoft help but it's wrong - slides are not documents)

Sub addTable()
Dim mySlide As Slide
Dim myTable As Shape
Set mySlide = ActivePresentation.Slides(1)
Set myTable = mySlide.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
myTable.Name = "Red Square"
End Sub

You will find it difficult to use hotkeys in PPT BTW.
Reply With Quote
Reply

Tags
give name, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set table's Name properties. (Powerpoint 2010 VBA) Updating Document Properties without using advanced properties dialogue thedr9wningman Word VBA 3 01-20-2014 05:56 PM
How to set table's Name properties. (Powerpoint 2010 VBA) How 2 Save Table Properties & Apply to other table Popeye.Tom Word Tables 1 04-24-2013 09:44 PM
Document properties opens everytime I open a powerpoint nyrangers1994 PowerPoint 0 01-08-2013 07:10 AM
Excel VBA: Control Word Table and Set its properties tinfanide Excel Programming 0 12-10-2011 09:06 AM
How to set table's Name properties. (Powerpoint 2010 VBA) Excel table properties pmblom Excel 4 07-03-2011 02:00 AM

Other Forums: Access Forums

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