在哪里可以找到Excel的图片集的文件?

问题描述:

我已经看到许多参考资料进行以下操作在Excel中插入图片:

I have seen many references to doing something like the following to insert a picture in Excel:

Set p = ActiveSheet.Pictures.Insert(PathToPicture)

我可以在哪里找到规范的文档?

Where can I find the canonical documentation for this?

我在VBA for Excel 2007中的doco中找不到这个...在2003年至2007年期间,我看到VBA doco中出现了一些事情。

I can't find this in the doco in VBA for Excel 2007... i have seen a few things go missing in the VBA doco between 2003 and 2007.

所以我的第一个建议是查看Excel或Access 2003帮助文件的副本。

So my first suggestion is look in a copy of Excel or Access 2003 help files.

在过去,我已经使用了Shapes集合的图像和形状,这在以后迭代过程非常方便。例如

In the past i've used the Shapes collection for images and shapes, which is handy for iterating over them later on. Eg;

sh.Shapes.AddPicture "c:\temp\pic.jpg", True, True, 0, 0, 80, 60

然而,您需要知道图像的大小,这可能或可能不是一个问题。

However you will need to know the size of the image, which may or may not be a problem.