View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Limitation on .Pictures.Insert?

I think the solution is very simple. Remove "http:" from the file name.
http is the name of a transfer protocol (hyper-text-transfer-protocol).
Excel want a file name which simply starts with the two slashes.

"Dave" wrote:

Hello. I fear I may be running into a limitation of VBA, but figured
I'd check with the gurus to see if I'm doing anything silly.

When I manually insert a photo (Insert | Picture | <filename) in
Excel (Office 12), it allows me to use an URL for my filename (eg.
http://www.seattlesmiths.com/photos/codi1.jpg). However if I try to
use an URL in my macro (ie ActiveSheet.Pictures.Insert("http://
www.seattlesmiths.com/photos/codi1.jpg")) it gives me the following
error:

"Unable to get the insert property of the Pictures class"

If I use a local photo, the call works correctly. Any ideas on how to
programatically insert a photo using an URL rather than a local file?

Thanks!
Dave