|
-
Oct 23rd, 2003, 05:49 PM
#1
Thread Starter
Member
- RESOLVED - How to add picture from web to Word doc
Is it possible to get Word VBA to insert a picture from a web page? I've tried the following using AddPicture method:
ActiveDocument.Shapes.AddPicture Anchor:=Selection.Range, FileName:= _
"http://www.google.ca/intl/en_ca/images/logo.gif", _
LinkToFile:=False, SaveWithDocument:=True
(as a test, loading the Google logo)
The above code is as generated by Macro record -which it gladly accepts as a valid filename.
When the macro is run however, it returns a 'Run-time error 5152 -This is not a valid filename.'
Yet if I use the Word menus: Insert, Picture, From File and enter a web addressed picture in the Filename box it finds and loads it into the Word doc without a problem. What gives? Is there another method for doing this?
Thanks.
Last edited by anti_you; Oct 24th, 2003 at 12:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|