from Automation in jscript how can I programatically insert an image into Word (2000+) from a URL?
The url also is quite long, around 400 characters, and I've read that Word 2007 has a problem sometimes with strings longer than 255 characters.
I've used this successfully except that it won't allow urls longer than 255 characters:
var oDialog = oWordDoc.Application.Dialogs( wdDialogInsertPicture );
oDialog.Name = imag开发者_如何转开发eUrl;
oDialog.LinkToFile = false;
oDialog.FloatOverText = true;
oDialog.Execute();
I don't have a > 255 char url to test it with, but try this:
oWordDoc.Shapes.AddPicture(imageUrl, false);
精彩评论