Open File in a powerpoint macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Where IS Open File in powerpoint VBA?

I'm writing a macro which will import a picture, resize it, crop it, and
centre it, but I can't find a command to open a standard select file dialog
box. (I'm looking for the equivalent of Excel VBA GetOpenFilename method).
Does this exist in powerpoint? If so what is it called?

Grateful for any help
 
If you don't want to go to all the trouble of creating and Add In to do what
you want to do. Look here.
BATCH IMPORT images into PowerPoint
http://www.rdpslides.com/pptfaq/FAQ00050.htm


--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]
 
This is one of those annoying cases where you find the answer just moments
after posting the question, so sorry for troubling those who answered.

For anyone else who wants to get an Open File dialog to select a single file
this will work:

Dim In_file As Variant

Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog( Type:=msoFileDialogOpen)
dlgOpen.AllowMultiSelect = False
If dlgOpen.Show = -1 Then
In_file = dlgOpen.SelectedItems.Item(1)
End If

As usual the Microsoft Help Answer Wizard is brilliant - just so long as you
know exactly what you're searching for. If you have a general problem but
don't know the exact wording that Microsoft uses to describe it it's totally
bloody useless.
 
Back
Top