トップ回答者
Excelに画像をPasteすると、COMExceptionがthrowされる

質問
-
以下がサンプルコードとExceptionの内容です。
いろいろと原因を調査してみたのですが、有用な情報にヒットしません。
情報へのポインタだけでも構いませんので、お力をお借りしたいと思っています。
よろしくお願いいたします。
■■■ コード ■■■private void SetImage( Image image, string cellAddress )
{
if ( image == null || String.IsNullOrEmpty( cellAddress ) )
throw new ArgumentNullException();
// -----
Worksheet target = this.Excel.ActiveSheet as Worksheet;
Clipboard.Clear();
Clipboard.SetImage( image );
Range range = target.get_Range( cellAddress, cellAddress );
range.Select();
try
{
// ここでCOMExceptionをthrowされる
target.Paste( range, false );
}
catch ( COMException )
{ }//try
// -----
if ( range != null )
Marshal.ReleaseComObject( range );
if ( target != null )
Marshal.ReleaseComObject( target );
}//SetImage■■■ Exceptionの内容 ■■■
System.Runtime.InteropServices.COMException がキャッチされました
HelpLink="C:\\Program Files\\Microsoft Office\\OFFICE11\\1041\\xlmain11.chm"
Message="データを貼り付けできません。"
Source="Microsoft Office Excel"
ErrorCode=-2146827284
StackTrace:
場所 Office.Interop.Excel._Worksheet.Paste(Object Destination, Object Link)