Inserting web-based images into a Word Document Using VBA

R

Ron Pierce

In WORD VBA, I can use easily open a web-based html file, using:

Documents.Open Filename:="http://www.mysite.com/index.html",
ConfirmConversions:=False, format:=wdOpenFormatText

However, if I try to insert a we-based IMAGE file, using either of these:

Selection.InlineShapes.AddPicture
Filename:="http://www.mysite.com/myimage.gif", LinkToFile:=False,
SaveWithDocument:=True

ActiveDocument.Shapes.AddPicture
Filename:=:="http://www.mysite.com/myimage.gif", LinkToFile:=False,
SaveWithDocument:=True

I get an "Invalid File Name" error.

How can I insert a web-based image into a document using VBA?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top