import/export

  • Thread starter Thread starter mcnewsxp
  • Start date Start date
M

mcnewsxp

i have to import some images to an existing PPT then export them so
thet the background image is retained, then import them into another
PPT for distribution. this is so the background branding is retained.
so 2 questions:
1) is there an easy smart way to do this\
2) or is there an way to export the saved images to the 2nd PPT via
VBA (i'm using VBA for the import/export).

tia,
mcnewsxp
 
Once you have the images inserted into your presentation, save the
presentation as .png files which will save all your images with the slide
background in tact, then use Shyam's image importer wizard to import you new
images into your new presentation. http://skp.mvps.org/iiw.htm

--
Michael Koerner
MS MVP - PowerPoint


i have to import some images to an existing PPT then export them so
thet the background image is retained, then import them into another
PPT for distribution. this is so the background branding is retained.
so 2 questions:
1) is there an easy smart way to do this\
2) or is there an way to export the saved images to the 2nd PPT via
VBA (i'm using VBA for the import/export).

tia,
mcnewsxp
 
Once you have the images inserted into your presentation, save the
presentation as .png files which will save all your images with the slide
background in tact, then use Shyam's image importer wizard to import you new
images into your new presentation.  http://skp.mvps.org/iiw.htm

--
  Michael Koerner
MS MVP - PowerPoint


i have to import some images to an existing PPT then export them so
thet the background image is retained, then import them into another
PPT for distribution.  this is so the background branding is retained.
so 2 questions:
1) is there an easy smart way to do this\
2) or is there an way to export the saved images to the 2nd PPT via
VBA (i'm using VBA for the import/export).

tia,
mcnewsxp

once confidured to do the import can it operate hands free?
 
It does that very well.

--
Michael Koerner
MS MVP - PowerPoint


Once you have the images inserted into your presentation, save the
presentation as .png files which will save all your images with the slide
background in tact, then use Shyam's image importer wizard to import you
new
images into your new presentation. http://skp.mvps.org/iiw.htm

--
Michael Koerner
MS MVP - PowerPoint


i have to import some images to an existing PPT then export them so
thet the background image is retained, then import them into another
PPT for distribution. this is so the background branding is retained.
so 2 questions:
1) is there an easy smart way to do this\
2) or is there an way to export the saved images to the 2nd PPT via
VBA (i'm using VBA for the import/export).

tia,
mcnewsxp

once confidured to do the import can it operate hands free?
 
Here's some code that will help with importing the images:

Batch Insert a folder full of pictures, one per slidehttp://www.pptfaq.com/FAQ00352.htm


Use the .Export method on each slide you want to export.

Export slides as graphicshttp://www.pptfaq.com/FAQ00022.htm

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/

thanks for the code. what i have in my PPT is very similar. what i
need is a way to import the saved images into another PPT file, but
the import is control by VBA code from the original PPT file. the 2nd
PPT file will be distributed to multiple users and i do not want the
macro enable/disable dialog box to appear like it does when you have
VBA modules in your PPT file.
 
It does that very well.

--
  Michael Koerner
MS MVP - PowerPoint







once confidured to do the import can it operate hands free?

my problem is i work in a federal government facility and software has
to go through a long approval process.
 
I know the feeling. I worked for the government for 40 years <g> Steve has
offered an alternate solution which will work well in your situation.

--
Michael Koerner
MS MVP - PowerPoint


It does that very well.

--
Michael Koerner
MS MVP - PowerPoint







once confidured to do the import can it operate hands free?

my problem is i work in a federal government facility and software has
to go through a long approval process.
 
here's what i did:
Sub AutomatePowerPoint()
' This requires that you set a reference to PowerPoint in Tools,
References
' You could later change these to As Object to avoid that necessity
Dim oPPTApp As PowerPoint.Application
Dim oPPTPres As PowerPoint.Presentation
Dim sPresentationFile As String
Dim nWhich As Integer
Dim oPicture As Shape
Dim FullPath As String
Dim FullPath2 As String
Dim oSl As Slide

FullPath = "C:\Temp\View45.PPT"

' Get a reference to PowerPoint app
Set oPPTApp = New PowerPoint.Application
' set it visible or you may get errors - there are ways around
this but they're
' beyond the scope of this FAQ
oPPTApp.Visible = True
' minimize if you want to hide it:
' oPPTApp.WindowState = ppWindowMinimized

' Open our source PPT file, get a reference to it
Set oPPTPres = oPPTApp.Presentations.Open(FullPath)

For nWhich = 1 To oPPTPres.Slides.Count
FullPath2 = "G:\FLU\dwweb\flu_live\weekly\UpdateTools\Graphics
\Slide" & nWhich & ".gif"
oPPTApp.ActiveWindow.View.GotoSlide nWhich
oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(1).Select
oPPTApp.ActiveWindow.Selection.ShapeRange.Delete

' Set this to the full path to picture.

' Change slide index position to the first slide
oPPTApp.ActiveWindow.View.GotoSlide nWhich
' Set oSlide to the first slide in the presentation.
Set oSl = oPPTApp.ActiveWindow.Presentation.Slides(nWhich)
'Set oSl = ActiveWindow.Selection.SlideRange(nWhich)

' Insert the picture at an arbitrary size;
' PowerPoint requires you to supply *some* height and width for
the picture
Set oPicture = oSl.Shapes.AddPicture(fileName:=FullPath2, _
LinkToFile:=False, _
SaveWithDocument:=True, _
Left:=0, Top:=0, _
Width:=720, Height:=540)
Next nWhich

With oPPTPres ' Do stuff ...
' Show the number of slides in the file, for example
MsgBox .Slides.Count
End With

' Cleanup
Set oPicture = Nothing
Set oSl = Nothing
' Close the presentation
oPPTPres.Close
' Quit PPT
oPPTApp.Quit
' Release variables
Set oPPTPres = Nothing
Set oPPTApp = Nothing
Exit Sub
End Sub
 
Assuming you've read the Batch Insert link, what's preventing you from doing
that?

Instead of inserting pictures into the active presentation, your code canuse
Presentations.Open to create a new presentation object and insert the images
into that instead.  That'll give you pictures but no macros.


==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/

yerp - that's what i did.
thanks.
 
Back
Top