Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Paste Special

Firstly I apologise in advance as this is a re-post, but if anyone can help
it would be greatly appreciated.

I am using Excel 97. I have grouped a number of shapes together on a
worksheet so that I can copy them to a powerpoint slide using the code
below that I have found on the web. The only trouble is when it is
pasted in the format isn't correct so I need it to be pasted in to the
powerpoint with a PASTE SPECIAL as PICTURE command. Can anyone assist
me with a solution, please?

Here's the Code:
****************

Sub Create_PowerPoint_Presentation()
' Add a reference to the PowerPoint-library
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer, strString As String

Set pptApp = CreateObject("PowerPoint.Application")
Set pptPres = pptApp.Presentations.Add(msoTrue) ' create a new
presentation
' or open an existing presentation
' Set pptPres =
pptApp.Presentations.Open("C:\Foldername\Filename. ppt")

' apply a slide template
pptPres.ApplyTemplate "C:\Program Files\Microsoft
Office\Templates\Presentation Designs\Watermark.pot"

Sheets("TitlePage").Shapes("Slide1").Copy ' copy a picture from
Excel

With pptPres.Slides
Set pptSlide = .Add(.Count + 1, ppLayoutText) ' add a slide
End With

With pptSlide

.Shapes(1).Delete ' remove title
'.Shapes(2).Delete ' remove the text box
.Shapes.PasteSpecial ' I need something here!

With .Shapes(.Shapes.Count)
.Left = 0
.Top = 0
.Width = 720
.Height = 540
End With

................


Thanks in advance

Mark

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Paste Special

Have you tried posting to the PowerPoint newsgroup? You need to use a
PowerPoint VBA command, would probably find some help there.
--
- K Dales


"Mark" wrote:

Firstly I apologise in advance as this is a re-post, but if anyone can help
it would be greatly appreciated.

I am using Excel 97. I have grouped a number of shapes together on a
worksheet so that I can copy them to a powerpoint slide using the code
below that I have found on the web. The only trouble is when it is
pasted in the format isn't correct so I need it to be pasted in to the
powerpoint with a PASTE SPECIAL as PICTURE command. Can anyone assist
me with a solution, please?

Here's the Code:
****************

Sub Create_PowerPoint_Presentation()
' Add a reference to the PowerPoint-library
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer, strString As String

Set pptApp = CreateObject("PowerPoint.Application")
Set pptPres = pptApp.Presentations.Add(msoTrue) ' create a new
presentation
' or open an existing presentation
' Set pptPres =
pptApp.Presentations.Open("C:\Foldername\Filename. ppt")

' apply a slide template
pptPres.ApplyTemplate "C:\Program Files\Microsoft
Office\Templates\Presentation Designs\Watermark.pot"

Sheets("TitlePage").Shapes("Slide1").Copy ' copy a picture from
Excel

With pptPres.Slides
Set pptSlide = .Add(.Count + 1, ppLayoutText) ' add a slide
End With

With pptSlide

.Shapes(1).Delete ' remove title
'.Shapes(2).Delete ' remove the text box
.Shapes.PasteSpecial ' I need something here!

With .Shapes(.Shapes.Count)
.Left = 0
.Top = 0
.Width = 720
.Height = 540
End With

...............


Thanks in advance

Mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Paste Special

The options for pastespecial in Powerpoint a
PpPasteDataType can be one of these PpPasteDataType constants.
ppPasteBitmap
ppPasteDefault default
ppPasteEnhancedMetafile
ppPasteGIF
ppPasteHTML
ppPasteJPG
ppPasteMetafilePicture
ppPasteOLEObject
ppPastePNG
ppPasteRTF
ppPasteShape
ppPasteText

I would try Bitmap or one of the Metafile's

Another thing you might look at is changing

Sheets("TitlePage").Shapes("Slide1").Copy

to

Sheets("TitlePage").Shapes("Slide1").CopyPicture xlScreen, xlBitmap
or
Sheets("TitlePage").Shapes("Slide1").CopyPicture xlScreen, xlPicture


--
Regards,
Tom Ogilvy



"Mark" wrote in message
...
Firstly I apologise in advance as this is a re-post, but if anyone can

help
it would be greatly appreciated.

I am using Excel 97. I have grouped a number of shapes together on a
worksheet so that I can copy them to a powerpoint slide using the code
below that I have found on the web. The only trouble is when it is
pasted in the format isn't correct so I need it to be pasted in to the
powerpoint with a PASTE SPECIAL as PICTURE command. Can anyone assist
me with a solution, please?

Here's the Code:
****************

Sub Create_PowerPoint_Presentation()
' Add a reference to the PowerPoint-library
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer, strString As String

Set pptApp = CreateObject("PowerPoint.Application")
Set pptPres = pptApp.Presentations.Add(msoTrue) ' create a new
presentation
' or open an existing presentation
' Set pptPres =
pptApp.Presentations.Open("C:\Foldername\Filename. ppt")

' apply a slide template
pptPres.ApplyTemplate "C:\Program Files\Microsoft
Office\Templates\Presentation Designs\Watermark.pot"

Sheets("TitlePage").Shapes("Slide1").Copy ' copy a picture from
Excel

With pptPres.Slides
Set pptSlide = .Add(.Count + 1, ppLayoutText) ' add a slide
End With

With pptSlide

.Shapes(1).Delete ' remove title
'.Shapes(2).Delete ' remove the text box
.Shapes.PasteSpecial ' I need something here!

With .Shapes(.Shapes.Count)
.Left = 0
.Top = 0
.Width = 720
.Height = 540
End With

...............


Thanks in advance

Mark



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Paste Special

Tom,

Brilliant, many thanks the metafilepicture works a treat.

--
Mark


"Tom Ogilvy" wrote:

The options for pastespecial in Powerpoint a
PpPasteDataType can be one of these PpPasteDataType constants.
ppPasteBitmap
ppPasteDefault default
ppPasteEnhancedMetafile
ppPasteGIF
ppPasteHTML
ppPasteJPG
ppPasteMetafilePicture
ppPasteOLEObject
ppPastePNG
ppPasteRTF
ppPasteShape
ppPasteText

I would try Bitmap or one of the Metafile's

Another thing you might look at is changing

Sheets("TitlePage").Shapes("Slide1").Copy

to

Sheets("TitlePage").Shapes("Slide1").CopyPicture xlScreen, xlBitmap
or
Sheets("TitlePage").Shapes("Slide1").CopyPicture xlScreen, xlPicture


--
Regards,
Tom Ogilvy



"Mark" wrote in message
...
Firstly I apologise in advance as this is a re-post, but if anyone can

help
it would be greatly appreciated.

I am using Excel 97. I have grouped a number of shapes together on a
worksheet so that I can copy them to a powerpoint slide using the code
below that I have found on the web. The only trouble is when it is
pasted in the format isn't correct so I need it to be pasted in to the
powerpoint with a PASTE SPECIAL as PICTURE command. Can anyone assist
me with a solution, please?

Here's the Code:
****************

Sub Create_PowerPoint_Presentation()
' Add a reference to the PowerPoint-library
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer, strString As String

Set pptApp = CreateObject("PowerPoint.Application")
Set pptPres = pptApp.Presentations.Add(msoTrue) ' create a new
presentation
' or open an existing presentation
' Set pptPres =
pptApp.Presentations.Open("C:\Foldername\Filename. ppt")

' apply a slide template
pptPres.ApplyTemplate "C:\Program Files\Microsoft
Office\Templates\Presentation Designs\Watermark.pot"

Sheets("TitlePage").Shapes("Slide1").Copy ' copy a picture from
Excel

With pptPres.Slides
Set pptSlide = .Add(.Count + 1, ppLayoutText) ' add a slide
End With

With pptSlide

.Shapes(1).Delete ' remove title
'.Shapes(2).Delete ' remove the text box
.Shapes.PasteSpecial ' I need something here!

With .Shapes(.Shapes.Count)
.Left = 0
.Top = 0
.Width = 720
.Height = 540
End With

...............


Thanks in advance

Mark




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Cut and Paste using Macro gives paste special method error Lourens Pentz Excel Programming 3 November 21st 04 10:42 PM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"