Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Kingwood, Texas, USA
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ppSaveAsJPG (PowerPoint 2003 SP2)

    Can anyone tell me how to use the ppSaveAsJPG command in a macro so that I can save a selected picture rather than the entire presentation?
    I can save the presentation with this code:
    ActivePresentation.SaveAs FileName:="J:My Photos" + MyName + ".JPG", FileFormat:=ppSaveAsJPG
    However, I don't want to save the presentation or even the individual slides--I want to save the selected photo as a .jpg. When I right-click on a photo in PowerPoint, I have the option of saving it as a .jpg file. Shouldn't this be doable in VBA?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ppSaveAsJPG (PowerPoint 2003 SP2)

    You can use the hidden Export method of the Shape object:

    ActiveWindow.Selection.ShapeRange.Export PathName:="J:My Photos" & MyName & ".JPG", Filter:=ppShapeFormatJPG

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Kingwood, Texas, USA
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ppSaveAsJPG (PowerPoint 2003 SP2)

    Thanks so much. This worked perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •