开发者

Automating Word to insert an image from a URL

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜