I am cross-posting this question from Microsoft Community私はそこに何の応答も得ていないので、ここで誰かがこのことを明らかにすることができます。BUG:Word 2013 VSTOでヘッダーの画像を処理できない
VSTOを使用してドキュメントを処理するとき、Word 2013に固有の問題に気付きました。
文書は、そのレイアウトオプション「テキストの折り返しで」に設定されているヘッダーまたはフッターの画像が含まれているいずれかの「テキストの前に」または「テキストの背面」と:
使い方私はここにREPROをアップロードし
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
:Word2013VstoImageFormattedInHeaderBug.zip
0123私は、ドキュメントを開き、図形を処理しようとすると、VSTOは、私は次の例外を取得しますここでprivate static bool ShapesWithinGroup(Shape shape)
{
var result = false;
try
{
// shape.GroupItems throws the exception
if (shape.GroupItems != null && shape.GroupItems.Count > 0)
{
result = true;
}
}
catch (UnauthorizedAccessException)
{
// This shape is not in a group - ignore
}
catch (Exception exception)
{
var exceptionString = exception.BuildExceptionString();
Console.WriteLine(exceptionString);
Console.WriteLine(exception.StackTrace);
//throw;
}
return result;
}
がいっぱい例外とスタックトレースです:コードの
関連作品はWordFieldEnumerator.cs
である
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
at Microsoft.Office.Interop.Word.Shape.get_GroupItems()
at Word2013VstoImageFormattedInHeaderBug.WordFieldEnumerator.ShapesWithinGroup(Shape shape) in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\WordFieldEnumerator.cs:line 170
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
at Microsoft.Office.Interop.Word.Shape.get_TextFrame()
at Word2013VstoImageFormattedInHeaderBug.WordFieldEnumerator.ProcessShapes(IEnumerable`1 shapes) in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\WordFieldEnumerator.cs:line 124
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__aa`1.MoveNext()
at Word2013VstoImageFormattedInHeaderBug.WordFieldEnumerator.ProcessShapes(IEnumerable`1 shapes) in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\WordFieldEnumerator.cs:line 90
at Word2013VstoImageFormattedInHeaderBug.WordFieldEnumerator.GetAllFields() in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\WordFieldEnumerator.cs:line 64
at Word2013VstoImageFormattedInHeaderBug.Program.LockDialogFields(Document document) in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\Program.cs:line 116
at Word2013VstoImageFormattedInHeaderBug.Program.PdfDocument(String documentFilePath) in C:\Users\QA\Desktop\Word2013VstoImageFormattedInHeaderBug\Word2013VstoImageFormattedInHeaderBug\Program.cs:line 60
例外は関係なく、私はそれをキャッチしようとするか否かとスローされ、それクラッシュのWord 2013:
このバグは、Word 2016では発生しません、シェイプを正常に処理できます。ただし、Office 2016へのアップグレードはオプションではありません。私はバグを修正するためにOffice 2013用の修正プログラムが必要だと考えています。
Word 2013でこれを行うには何かできますか?私は、Office 2013の複数の修復や再インストールを含め、多数の想定されていた修正を無駄に試しました。
1. [ビデオドライバを更新しましたか](http://codeworks.it/blog/?p=136)? 2.アンチウィルス/ファイアウォールを無効にしても何か違いはありますか? 3. [wwlib.dll]の名前を変更しようとしましたか(https://answers.microsoft。com/en-us/office/forum/office_2010-word/word-2010-crashes-once-in-two-days-event-viewer/8b415426-3486-45c9-801a-01cbc114b184)とオフィス修理を行っていますか? 4.サーバーOSでこれを実行していませんか? 5. [Shapesで動作するコード](https://social.msdn.microsoft.com/Forums/office/en-US/b89dd0df-d46a-4fbd-97fe-d597fc292ceb/problem-setting-width-for-inlineshape) ?forum = worddev)は正しいですか? –
@JeremyThompson 1.はい。 2.いいえ3.はい。 4.いいえ、Windows 10 64ビットバージョン1511(OSビルド10586.318)、Word 2013 32ビット15.0.4823.1000(MSO 15.0.4823.1000)、Office Standard 2013の一部。5.はい。バグはまだ発生し、Wordはクラッシュします。確認すべきことはありますか? –
グループではないときに例外をキャッチするのではなく、シェイプの 'Type'をチェックしてもそれが起こりますか? – Chris