Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My day to day work involves creating powerpoints for clients highlighting their campaign performance. Most of the charts have been linked to excel, which saves me a ton of time but I end up spending time updating the images in the powerpoint.

In order to preserve the size and postion of images, i use the change picture option when you right select the picture and paste in the link like this: https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-snc6/9943_10151547582895095_1006500471_n.jpg. All the links are ordered in excel which is given by the client.

I have already gone through a similar post here: Using VBA to insert/update image in PowerPoint?, but i was looking for a solution where the pictures get updated based on the links in excel. Any help here would be appreciated.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

I found the answer at a different website. Posting it here in case anyone else is looking at solving the same challenge:

Sub recupererImageWeb_WinHttp()
'activate library : Microsoft WinHttp Services ,version 5.1
Dim b() As Byte
Dim h As Long
Dim oWinHttp1 As WinHttp.WinHttpRequest
Dim dex As String

dex = Worksheets("Sheet1").Cells(2, 11).Value

h = FreeFile
Open "C:\AAAA - Report\WWWWorkflow\cover.jpg" For Binary As #h

Set oWinHttp1 = New WinHttp.WinHttpRequest
oWinHttp1.Open "GET", _
dex, False

oWinHttp1.Send
oWinHttp1.WaitForResponse (30)
b() = oWinHttp1.ResponseBody

Set oWinHttp1 = Nothing
Put #h, 1, b()
Close #h



End Sub
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.