I want to create slides in PP where the user can copy and paste 1 to 5 pictures & separate text-boxes onto fixed positions on the slide. Fixed, because I want the pictures and accompanying text-boxes to be aligned perfectly. I played a bit with my master slide but I can't get this to work.
Am I correct that the only good way to do this might be via VBA? I can have the user select the pictures and then copy them and paste them exactly at the right positions.
Aligning pictures and text-boxes
-
- BronzeLounger
- Posts: 1254
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Aligning pictures and text-boxes
You could provide placeholders, but in my experience users are likely to paste outside those.
So VBA is probably the safest method to get what you want.
So VBA is probably the safest method to get what you want.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1254
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: Aligning pictures and text-boxes
So, coming back to this one and before I start anything...
If I'd have 40 small pictures (icon) and I'd want a user to select 5 and place these in a document so they are aligned and in fixed positions with accompanying texts underneath. So how would I approach this problem?
First the selection of the pictures and then copying them to another, pre-determined place? I'm not even sure yet myself where I'd like to do it. My current plan is to program in Excel, have the icons there too and then call PowerPoint from VBA en use a bit of PP VBA from Excel to get things in the right place.
The PowerPoint is there as the template for the output document is in PowerPoint now (but maybe I could try to mimic that in Excel itself even).
There might be other and better ways maybe, which is why I'm asking for suggestions on how I could approach this best. The coding I could probably manage with just a little help here and there :-)
If I'd have 40 small pictures (icon) and I'd want a user to select 5 and place these in a document so they are aligned and in fixed positions with accompanying texts underneath. So how would I approach this problem?
First the selection of the pictures and then copying them to another, pre-determined place? I'm not even sure yet myself where I'd like to do it. My current plan is to program in Excel, have the icons there too and then call PowerPoint from VBA en use a bit of PP VBA from Excel to get things in the right place.
The PowerPoint is there as the template for the output document is in PowerPoint now (but maybe I could try to mimic that in Excel itself even).
There might be other and better ways maybe, which is why I'm asking for suggestions on how I could approach this best. The coding I could probably manage with just a little help here and there :-)
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Aligning pictures and text-boxes
Do you have a specific reason for doing this from Excel? Since you'll have to use PowerPoint VBA anyway, why not do it all in PowerPoint?
PS PowerPoint VBA is weird - even weirder than Outlook VBA...
PS PowerPoint VBA is weird - even weirder than Outlook VBA...
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Aligning pictures and text-boxes
How "fixed" do you want the placeholders?
If you create a slide layout with 5 image placeholders and the necessary text placeholders in a slide master, the user can click the image icon in the placeholder and browse for the images for each of the 5, then click in the text placeholder and type text.
Even if they do move the placeholder, it really costs a single click on the reset button on the Home ribbon for the alignment of the image and text boxes to move back to the size and position of the underlying master you created...
If you create a slide layout with 5 image placeholders and the necessary text placeholders in a slide master, the user can click the image icon in the placeholder and browse for the images for each of the 5, then click in the text placeholder and type text.
Even if they do move the placeholder, it really costs a single click on the reset button on the Home ribbon for the alignment of the image and text boxes to move back to the size and position of the underlying master you created...
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- BronzeLounger
- Posts: 1254
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: Aligning pictures and text-boxes
Hans, I'd like to do as much as possible in Excel VBA exactly because of the weird VBA in other Office programs... Can I easily select pictures that are in Excel and then copy-and-paste them in PP?
Rudy, maybe this is easiest yes, problem is that I wanted the user to copy and paste the pictures and that's not possible with a placeholder: one has to click (as you indicate too) and then browse. Also, that action makes the pictures independent from the texts... this is why I'm thinking about some sort of automation.
Rudy, maybe this is easiest yes, problem is that I wanted the user to copy and paste the pictures and that's not possible with a placeholder: one has to click (as you indicate too) and then browse. Also, that action makes the pictures independent from the texts... this is why I'm thinking about some sort of automation.
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Aligning pictures and text-boxes
If you copy a shape such as a picture in Excel, you can paste it into a PowerPoint slide. Let's say that you have an object pptSlide of type PowerPoint.Slide.
You can then use
This assumes that you have already set pptSlide to the slide where you want to paste the picture.
You can then use
Code: Select all
With pptSlide.Shapes.Paste
.Top = 100
.Left = 200
End With
Best wishes,
Hans
Hans