![]() |
|
|
|
#1
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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. Last edited by JohnWilson; 07-08-2014 at 12:54 AM. |
|
#3
|
|||
|
|||
|
I really really appreciate your help T.T. Thank you so much!!
It works Perfectly. Quote:
|
|
| Tags |
| give name, vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Updating Document Properties without using advanced properties dialogue
|
thedr9wningman | Word VBA | 3 | 01-20-2014 05:56 PM |
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 |
Excel table properties
|
pmblom | Excel | 4 | 07-03-2011 02:00 AM |