InlineShapes
koleksiyonunda çıplak bir Select()
yönteminin bulunmadığını söyleyebilirim. Bu nedenle koleksiyondaki linq'i kullanmaya çalıştığınızı kabul ediyorum.
InlineShapes
is an implementation of IEnumerable
which does not have a Select(...)
method.
Bunu yapman gerektiğinden şüpheleniyorum.
// Note the select is spurious here
oDoc.InlineShapes.OfType().Select((shape) => shape)
OfType()
returns an IEnumerable
which does support the Select(...)
method.
Seç (
) IEnumerable
ile genişletildiyse, Object
türünde kullanmanız için herhangi bir yararlı özellik bulunmayacağını düşünelim. .
DÜZENLE
InlineShapes'ten görüntüler almak istersen ...
var pictures = oDoc.InlineShapes.OfType().Where(s =>
s.Type = WdInlineShapeType.wdInlineShapePicture ||
s.Type = WdInlineShapeType.wdInlineShapeLinkedPicture ||
s.Type = WdInlineShapeType.wdInlineShapePictureHorizontalLine ||
s.Type = WdInlineShapeType.wdInlineShapeLinkedPictureHorizontalLine);
foreach(var picture in pictures)
{
picture.Select();
oWord.Selection.Copy()
//Then you need to retrieve the contents of the clipboard
//which I feel is another question.
}
Bu, resmi olan belgede tüm satır içi şekillerden oluşmalıdır.