 |
|
 |
|
Next: Mail Merge
|
| Author |
Message |
External

Since: Jul 6, 2009 Posts: 2
|
(Msg. 1) Posted: Mon Jul 06, 2009 7:10 pm
Post subject: vba excel to PPT: name excel shape into PPT template with other sh Archived from groups: microsoft>public>powerpoint (more info?)
|
|
|
Hi,
I've got a macro that copies a shape/chart created in excel and then pastes
the shape into a powerpoint slide that already has a number of other shapes
in it (a template PPT file). I've noticed that when the shape is pasted into
the PPT slide, PPT assigns a semi-arbitrary name to the shape (e.g., "Picture
86"), which requires me to then use that name to apply changes to the shape.
However, it would be more efficient to give the shape a meaningful name that
would not change should the PPT template change in future. Below is the code
I am currently using (it gives an error on the 'With' statement). It must be
as easy as adding .Name = "overall_role_shape" somewhere in the macro, but I
can't figure out where. Thanks for any help.
Dim overall_role_sh As Shape
Set overall_role_sh = Worksheets("Overall_Role").Shapes(1)
overall_role_sh.CopyPicture Appearance:=xlScreen, Format:=xlPicture
PPpres.Slides(2).Shapes.Paste
With PPpres.Slides(2).Shapes("overall_role_shape")
.Left = 14.12
.Top = 116.75
.ZOrder msoSendToBack
End With >> Stay informed about: vba excel to PPT: name excel shape into PPT template with .. |
|
| Back to top |
|
 |  |
External

Since: Nov 19, 2008 Posts: 6
|
(Msg. 2) Posted: Mon Jul 06, 2009 7:29 pm
Post subject: Re: vba excel to PPT: name excel shape into PPT template with other sh Archived from groups: per prev. post (more info?)
|
|
|
Try:
With PPpres.Slides(2).Shapes.Paste(1)
.Name = "overall_role_shape"
.Left = 14.12
.Top = 116.75
.ZOrder msoSendToBack
End With
Regards,
Shyam Pillai
Handout Wizard: [URL="http://skp.mvps.org/how"]http://skp.mvps.org/how[/URL]
"intoit" wrote in message
> Hi,
>
> I've got a macro that copies a shape/chart created in excel and then
> pastes
> the shape into a powerpoint slide that already has a number of other
> shapes
> in it (a template PPT file). I've noticed that when the shape is pasted
> into
> the PPT slide, PPT assigns a semi-arbitrary name to the shape (e.g.,
> "Picture
> 86"), which requires me to then use that name to apply changes to the
> shape.
> However, it would be more efficient to give the shape a meaningful name
> that
> would not change should the PPT template change in future. Below is the
> code
> I am currently using (it gives an error on the 'With' statement). It must
> be
> as easy as adding .Name = "overall_role_shape" somewhere in the macro, but
> I
> can't figure out where. Thanks for any help.
>
> Dim overall_role_sh As Shape
>
> Set overall_role_sh = Worksheets("Overall_Role").Shapes(1)
> overall_role_sh.CopyPicture Appearance:=xlScreen, Format:=xlPicture
> PPpres.Slides(2).Shapes.Paste
> With PPpres.Slides(2).Shapes("overall_role_shape")
> .Left = 14.12
> .Top = 116.75
> .ZOrder msoSendToBack
> End With
>
> >> Stay informed about: vba excel to PPT: name excel shape into PPT template with .. |
|
| Back to top |
|
 |  |
External

Since: Jul 6, 2009 Posts: 2
|
(Msg. 3) Posted: Tue Jul 07, 2009 9:20 pm
Post subject: Re: vba excel to PPT: name excel shape into PPT template with othe Archived from groups: per prev. post (more info?)
|
|
|
Thanks, Shyam Pillai. Your suggestion works perfectly.
"Shyam Pillai" wrote:
> Try:
>
> With PPpres.Slides(2).Shapes.Paste(1)
> .Name = "overall_role_shape"
> .Left = 14.12
> .Top = 116.75
> .ZOrder msoSendToBack
> End With
>
>
> Regards,
> Shyam Pillai
>
> Handout Wizard: [URL="http://skp.mvps.org/how"]http://skp.mvps.org/how[/URL]
>
> "intoit" wrote in message
>
> > Hi,
> >
> > I've got a macro that copies a shape/chart created in excel and then
> > pastes
> > the shape into a powerpoint slide that already has a number of other
> > shapes
> > in it (a template PPT file). I've noticed that when the shape is pasted
> > into
> > the PPT slide, PPT assigns a semi-arbitrary name to the shape (e.g.,
> > "Picture
> > 86"), which requires me to then use that name to apply changes to the
> > shape.
> > However, it would be more efficient to give the shape a meaningful name
> > that
> > would not change should the PPT template change in future. Below is the
> > code
> > I am currently using (it gives an error on the 'With' statement). It must
> > be
> > as easy as adding .Name = "overall_role_shape" somewhere in the macro, but
> > I
> > can't figure out where. Thanks for any help.
> >
> > Dim overall_role_sh As Shape
> >
> > Set overall_role_sh = Worksheets("Overall_Role").Shapes(1)
> > overall_role_sh.CopyPicture Appearance:=xlScreen, Format:=xlPicture
> > PPpres.Slides(2).Shapes.Paste
> > With PPpres.Slides(2).Shapes("overall_role_shape")
> > .Left = 14.12
> > .Top = 116.75
> > .ZOrder msoSendToBack
> > End With
> >
> >
> >> Stay informed about: vba excel to PPT: name excel shape into PPT template with .. |
|
| Back to top |
|
 |  |
| Related Topics: | PP2007: click shape, it recenters on shape - I do most of my work on Powepoint zoomed in at 200-400% with shapes that extend off the screen. In the 2007 version it now recenters my view to the center of the shape I click. If I need to adjust one corner of a rectangle, when I click it it takes....
Excel linking a Table - Opening the linked table source: - how do I remove the extra link info (e.g. "Book1.xslx!Sheet!R1C1:R5C2" Updating the Source file name of a linked table in Powerpoint: - how do i get the full path of the file? thanks, Amrit
help feature and Importing from Excel/Word - I am brand new to 2007 applications, but am familiar with 2003. I cannot seem to locate where the help option is in ppt 2007 and I needed to look up how to import a table from an Excel file I have into my presentation. If someone could please get me...
Excel charts not showing in Powerpoint - A presentation was sent to me that was developed using Office 2007 but the file was saved in 2003 format (PPT). The presentation looks fine on a machine with Office 2007 but on a machine with Office 2003 some of the graphs and charts are missing and....
Updating Excel Link in PPT - Hey, I've got a PPT presentation that has Excel files linked into thre presentation (paste special; past link) but PPT isn't asking me to update links when i open it....so therefore my PPT has old Excel data...how do i get PPT to "refresh" a... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|