C# と Microsoft.Office.Interop を使用して MS Word で再度開こうとしている .bin ファイルとして保存されている Word 8.0 ドキュメントがあります。ドキュメントを開いて内容を表示することはできますが、ドキュメントのスタイル (フォント サイズ、下線など) は適用されません。
私のコードは次のとおりです。
object pathToBin = @"\\server\folder\123.bin";
object missingType = Type.Missing;
object readOnly = true;
object isVisible = false;
object documentFormat = WdOpenFormat.wdOpenFormatDocument97;
Application applicationclass = new Application();
applicationclass.Documents.Open(ref pathToBin,
ref readOnly,
ref missingType, ref missingType, ref missingType,
ref missingType, ref missingType, ref missingType,
ref missingType, ref missingType, ref isVisible,
ref missingType, ref missingType, ref missingType,
ref missingType, ref missingType);
applicationclass.Visible = true;
Document document = applicationclass.ActiveDocument;
ドキュメント自体を開くと、文字通り次のようなスタイルが表示されているようです。
Heading 1
Heading 1
Heading 2
Heading 2
Heading 3
Heading 3
Hyperlink
Hyperlink
等
何かご意見は?