acOLEPase Changes Sizing After 1st???

G

Guest

I am using vba in Access and PowerPoint.

I have loop for 10, and I noticed the first acOLEPaste paste my OLEObject in
Full size from left to right border of the power point. After the first one,
they are not full size any longer and it still pasted the ole object in a
smaller scale.

A sample of my code is:

Forms![GenPPT]![OLEFile].Action = acOLECopy
oPres.PageSetup.SlideHeight = (8.5 * 1440) / 20
oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.Paste

oLeft = (0.05 * 1440) / 20
oTop = (0.1 * 1440) / 20
oWidth = (1# * 1440) / 20
oHeight = (0.6979 * 1440) / 20
With
oPres.Slides.Item(oPres.Slides.Count).Shapes.AddLabel(msoTextOrientationHorizontal, oLeft, oTop, oWidth, oHeight).TextFrame.TextRange
.Text = IIf(IsNull(T![Personnel]) = True, "", T![Personnel])
With .Font
.Name = "Arial"
.Size = 40
.Bold = msoTrue
End With
End With


The funny thing is the fact only the 1st is full sized and the remainder are
smaller.

Could it be the clip board memory getting full after the first copy and
paste??? I know the clip board is no reset if you are doing things back to
back???

Any help is deeply apreciated.

I am getting very close in complete this program and I could sure use the
help.


Gary
 
S

Steve Rindsberg

I am using vba in Access and PowerPoint.

I have loop for 10, and I noticed the first acOLEPaste paste my OLEObject in
Full size from left to right border of the power point. After the first one,
they are not full size any longer and it still pasted the ole object in a
smaller scale.

I can't see why it'd affect anything, but then I can't see exactly how your loop works,
but try setting the .SlideHeight only once rather than each time through the loop.

Also, the code might be faster by a micronanosplittosecond (and noticeably more readable)
if you use e.g. (8.5 * 72) rather than (8.5 * 1440) / 20

All PPT measurements are in Points (72 to the inch).

But feel free to ignore that ... just a matter of style.
A sample of my code is:

Forms![GenPPT]![OLEFile].Action = acOLECopy
oPres.PageSetup.SlideHeight = (8.5 * 1440) / 20
oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.Paste

oLeft = (0.05 * 1440) / 20
oTop = (0.1 * 1440) / 20
oWidth = (1# * 1440) / 20
oHeight = (0.6979 * 1440) / 20
With
oPres.Slides.Item(oPres.Slides.Count).Shapes.AddLabel(msoTextOrientationHorizontal,
oLeft, oTop, oWidth, oHeight).TextFrame.TextRange
.Text = IIf(IsNull(T![Personnel]) = True, "", T![Personnel])
With .Font
.Name = "Arial"
.Size = 40
.Bold = msoTrue
End With
End With

The funny thing is the fact only the 1st is full sized and the remainder are
smaller.

Could it be the clip board memory getting full after the first copy and
paste??? I know the clip board is no reset if you are doing things back to
back???

Any help is deeply apreciated.

I am getting very close in complete this program and I could sure use the
help.

Gary
 
Top