rruckus
10-20-2010, 09:27 AM
In Word 2007, does anyone know how to insert an image from a URL with authentication (username/password) using VBA??? I've scoured the web and can't find anything.
Inserting an image is easy:
Selection.Range.InlineShapes.AddPicture FileName:=sMyServerGraphicPath, LinkToFile:=True, SaveWithDocument:=True
But if that image requires http authentication, this command will fail. Does anyone know how to set the authentication before inserting the image maybe. Or is there another way to do this?
Even if I try through Word's Insert>Picture dialog it fails with the message "An error occurred while importing this file...". Doing the same thing on a web graphic that doesn't require authentication works just fine.
Inserting an image is easy:
Selection.Range.InlineShapes.AddPicture FileName:=sMyServerGraphicPath, LinkToFile:=True, SaveWithDocument:=True
But if that image requires http authentication, this command will fail. Does anyone know how to set the authentication before inserting the image maybe. Or is there another way to do this?
Even if I try through Word's Insert>Picture dialog it fails with the message "An error occurred while importing this file...". Doing the same thing on a web graphic that doesn't require authentication works just fine.