A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Resizing imported PowerPoint slides



 
 
Thread Tools Display Modes
  #1  
Old March 5th, 2008, 06:08 PM posted to microsoft.public.word.tables
ctrhippie
external usenet poster
 
Posts: 2
Default Resizing imported PowerPoint slides

I have projects where I import PowerPoint slides into a table no Word.

One slide per row.

In order to fit our standardized format, I have to resize the slides (shrink
them down). I currently do this by resizing each slide one at a time. Is
there any way to select all the slides in a tabe at once and resize them?
  #2  
Old March 5th, 2008, 06:11 PM posted to microsoft.public.word.tables
ctrhippie
external usenet poster
 
Posts: 2
Default Resizing imported PowerPoint slides

Let me clear this up a bit. I import the slide INTO word.

I'm trying to figure out how to resize all the imported slides at once
reather than going to each table cell and resizing.

(Next time I'll proof-read my question!)

"ctrhippie" wrote:

I have projects where I import PowerPoint slides into a table no Word.

One slide per row.

In order to fit our standardized format, I have to resize the slides (shrink
them down). I currently do this by resizing each slide one at a time. Is
there any way to select all the slides in a tabe at once and resize them?

  #3  
Old March 5th, 2008, 07:31 PM posted to microsoft.public.word.tables
Jean-Guy Marcil[_2_]
external usenet poster
 
Posts: 374
Default Resizing imported PowerPoint slides

"ctrhippie" wrote:

Let me clear this up a bit. I import the slide INTO word.

I'm trying to figure out how to resize all the imported slides at once
reather than going to each table cell and resizing.


I assume that the PowerPoint objects are inline with text in the cells. If
that is the case, use this macro. Just change "sngNewHeight" to the value (in
inches) that you need for the height of the slides in Word. In this code the
value is 2.5 inches.

Sub ResizePowerPoint()

Dim tblPower As Table
Dim rgeTable As Range
Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

If ActiveDocument.Tables.Count 0 Then
For Each tblPower In ActiveDocument.Tables
Set rgeTable = tblPower.Range
If rgeTable.InlineShapes.Count 0 Then
For Each inshpPower In rgeTable.InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
End If
Next
Else
MsgBox "There are no tables in this document.", _
vbExclamation, "Cancelled"
End If

End Sub

  #4  
Old March 6th, 2008, 07:21 AM posted to microsoft.public.word.tables
DeanH
external usenet poster
 
Posts: 1,783
Default Resizing imported PowerPoint slides

This is a nippy bit of maco.
One question, how would it look if it changed the size of multiple images
not in a table?
Many thanks
DeanH

"Jean-Guy Marcil" wrote:

"ctrhippie" wrote:

Let me clear this up a bit. I import the slide INTO word.

I'm trying to figure out how to resize all the imported slides at once
reather than going to each table cell and resizing.


I assume that the PowerPoint objects are inline with text in the cells. If
that is the case, use this macro. Just change "sngNewHeight" to the value (in
inches) that you need for the height of the slides in Word. In this code the
value is 2.5 inches.

Sub ResizePowerPoint()

Dim tblPower As Table
Dim rgeTable As Range
Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

If ActiveDocument.Tables.Count 0 Then
For Each tblPower In ActiveDocument.Tables
Set rgeTable = tblPower.Range
If rgeTable.InlineShapes.Count 0 Then
For Each inshpPower In rgeTable.InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
End If
Next
Else
MsgBox "There are no tables in this document.", _
vbExclamation, "Cancelled"
End If

End Sub

  #5  
Old March 6th, 2008, 02:12 PM posted to microsoft.public.word.tables
Jean-Guy Marcil[_2_]
external usenet poster
 
Posts: 374
Default Resizing imported PowerPoint slides

"DeanH" wrote:

This is a nippy bit of maco.
One question, how would it look if it changed the size of multiple images
not in a table?
Many thanks


Something like this (untested).
But this only works on inlinehapes. You would need another routine if you
also have floating shapes. Of course, if you only have floating shapes, you
would need different code.


Sub ResizePowerPoint()

Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

With ActiveDocument
If .InlineShapes.Count 0 Then
For Each inshpPower In .InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
Else
MsgBox "There are no shapes in this document.", _
vbExclamation, "Cancelled"
End If
End With

End Sub

  #6  
Old March 6th, 2008, 02:19 PM posted to microsoft.public.word.tables
DeanH
external usenet poster
 
Posts: 1,783
Default Resizing imported PowerPoint slides

Many thanks for this.
As I don't often use floating shapes, I don't foresee any problems.
I shall have a play later.
Thanks again.
DeanH

"Jean-Guy Marcil" wrote:

"DeanH" wrote:

This is a nippy bit of maco.
One question, how would it look if it changed the size of multiple images
not in a table?
Many thanks


Something like this (untested).
But this only works on inlinehapes. You would need another routine if you
also have floating shapes. Of course, if you only have floating shapes, you
would need different code.


Sub ResizePowerPoint()

Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

With ActiveDocument
If .InlineShapes.Count 0 Then
For Each inshpPower In .InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
Else
MsgBox "There are no shapes in this document.", _
vbExclamation, "Cancelled"
End If
End With

End Sub

  #7  
Old March 7th, 2008, 07:13 AM posted to microsoft.public.word.tables
DeanH
external usenet poster
 
Posts: 1,783
Default Resizing imported PowerPoint slides

This works perfectly.
I swapped the Height and Width as I want the width to be the controlling
factor.
Also changed the InchesToPoints to CentimetersToPoints, no problems at all.
Many thanks Jean-Guy.
Have a nice day.
DeanH

"DeanH" wrote:

Many thanks for this.
As I don't often use floating shapes, I don't foresee any problems.
I shall have a play later.
Thanks again.
DeanH

"Jean-Guy Marcil" wrote:

"DeanH" wrote:

This is a nippy bit of maco.
One question, how would it look if it changed the size of multiple images
not in a table?
Many thanks


Something like this (untested).
But this only works on inlinehapes. You would need another routine if you
also have floating shapes. Of course, if you only have floating shapes, you
would need different code.


Sub ResizePowerPoint()

Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

With ActiveDocument
If .InlineShapes.Count 0 Then
For Each inshpPower In .InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
Else
MsgBox "There are no shapes in this document.", _
vbExclamation, "Cancelled"
End If
End With

End Sub

  #8  
Old March 7th, 2008, 01:52 PM posted to microsoft.public.word.tables
Jean-Guy Marcil[_2_]
external usenet poster
 
Posts: 374
Default Resizing imported PowerPoint slides

"DeanH" wrote:

This works perfectly.
I swapped the Height and Width as I want the width to be the controlling
factor.
Also changed the InchesToPoints to CentimetersToPoints, no problems at all.
Many thanks Jean-Guy.
Have a nice day.


Glad I could help... you too! (have a nice day)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.