Results 1 to 3 of 3
  1. #1
    cgschlangen
    Guest

    Download picture from web and place in slide (2000)

    I'm looking for a script that will download and place a picture from the web into a slide, position on the slide doesn't matter - just ease for the user... - "Click this button and you're image will appear..."
    The link will be static and shouldn't ever need editing so the link can be in the script too...
    I'm not sure if it's possible, but if anyone has an idea that would help me out, much thanks.
    Dan

  2. #2
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Download picture from web and place in slide (2000)

    Morning Dan

    Dog got me up early so I have had a chance to Google around for a couple of hours but I am afraid nothing seems to fit the criteria that you are after, I have never attempted anything like this, the nearest is a hidden slide that contains a library of pictures from which the user can hyperlink to, choose a picture, and return to the original slide and paste the selected picture but I can't even find that now on any of my CD's, if that sounds of interest I will have a go at re-creating it.

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  3. #3
    cgschlangen
    Guest

    Re: Download picture from web and place in slide (2000)

    After a couple hours online I found a script to do exactly what I needed - thought I'd share it w/ everyone. I don't remember the source off the top of my head - possibly MSDN... This script will download and place an image into your slide, scale it to the width/height of the slide, and then center the image so you have a ready made slide. The "hyperlink" could also point to locally stored data.
    Enjoy,
    Dan

    Sub LoadImages()
    Dim oSlide as Slide
    Dim oPicture as Shape

    ActiveWindow.View.GotoSlide 1
    Set oSlide ActiveWindow.Presentation.Slides(1)

    Set oPicture = oSlide.Shapes.Addpicture("http://www.google.com/intl/en_ALL/images/logo.gif", _
    msoFalse, msoTrue, 1, 1, 1, 1)
    oPicture.ScaleHeight 1, msoTrue
    oPicture.ScaleWidth 1, mso True

    With ActivePresentation.PageSetup
    oPicture.Left = (.SlideWidth 2) - (oPicture.Width 2)
    oPicture.Top = (.SlideHeight 2) - (oPicture.Height 2)
    oPicture.Select
    End With
    End Sub

    Of note, I found that the .ScaleHeight object wasn't that reliable w/ the images I was working with - I used the following workaround on these images:
    oPicture.LockAspectRatio = msoFalse
    oPicture.Width = ActivePresentation.PageSetup.SlideWidth
    oPicture.Height = ActivePresentation.PageSetup.SlideHeight

    Also using the .PictureFormat.CropTop object works perfectly for what I needed - example below:
    Set oPicture = oSlide.Shapes.Addpicture("http://www.google.com/intl/en_ALL/images/logo.gif", _
    msoFalse, msoTrue, 1, 1, 1, 1)
    oPicture.PictureFormat.CropTop = 30
    oPicture.PictureFormat.CropBottom = 10
    oPicture.PictureFormat.CropLeft = 10
    oPicture.PictureFormat.CropRight = 27
    oPicture.ScaleHeight 1, msoTrue
    oPicture.ScaleWidth 1, mso True

Posting Permissions

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