答案 0 :(得分:1)
这可以使用名为“Microsoft.Office.Interop.Word.dll”的dll中公开的API来完成。 这是一个可以帮助您的[教程] :( http://www.kunal-chowdhury.com/2017/02/how-to-read-microsoft-word-document.html#wE1rUI1QABZh86bw.97)
答案 1 :(得分:1)
using System;
using Microsoft.Office.Interop.Word;
namespace PageSetup
{
class TestPageOrientation
{
static void Main(string[] args)
{
var app = new Microsoft.Office.Interop.Word.Application();
app.Visible = true;
//Load Document
Document document = app.Documents.Open(@"/*YOUR FILE PATH HERE*/");
document.PageSetup.Orientation = WdOrientation.wdOrientLandscape;
}
}
}