Pasting to PowerPoint from Access

A

Alan Schneider

We upgraded from Access97 to Access2002 and are having a
problem with the code below--there is much more code, this
is just where we have been able to track down the
problem. From an Access database it is suppose to take a
sheet copied from an Excel spreadsheet and past it into a
PowerPoint slide. I have no credible experience with this
and could use any help. thanks

Alan S

===================================

Set shp = pptPres.Slides(lPageNumber).Shapes.Paste
w = shp.Width
h = shp.Height
If (MAXSLIDEWIDTH / w) < (MAXSLIDEHEIGHT /
h) Then 'shrink if either dimension is too large
shp.ScaleWidth (MAXSLIDEWIDTH / w),
False, 2
shp.ScaleHeight (MAXSLIDEWIDTH / w),
False, 2
Else
shp.ScaleWidth (MAXSLIDEHEIGHT / h),
False, 2
shp.ScaleHeight (MAXSLIDEHEIGHT / h),
False, 2
End If

'set position
t = shp.Top
l = shp.Left


'shp.IncrementTop ((SLIDETOP +
(MAXSLIDEHEIGHT - shp.Height) / 2) - t) 'to center
vertically
shp.IncrementTop (SLIDETOP - t) 'align to
top of slide
shp.IncrementLeft ((SLIDELEFT +
(MAXSLIDEWIDTH - shp.Width) / 2) - l)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top