问题描述
你好!
我开始了一个项目,到目前为止一切正常。现在我希望程序打开Word。这也很好。但现在我想把Wordwindow放在Winform的一个面板中。我怎样才能做到这一点?我试过它isMdiContainer但是这不起作用因为
Hi there!
I´ve started a project and everything is working good so far. Now i want the program to open Word. That works fine too. But now i wanna put the Wordwindow inside a panel of the Winform. How can i do that? I tried it isMdiContainer but that does not work because the
Word.Application()
不是Window并且面板没有任何isMdiContainer。请帮助!!
其次我在utube上观看了一个视频,我可以用Word替换某些东西,或者使用Merge Field并放入其中的东西。我试过但它不起作用:
is no Window and the panel has no propety "isMdiContainer". Please help!!
Secondly i watched a video on utube how i can replace something in Word or have Merge Field and put something in it. I tried but it doesnt work:
foreach(Microsoft.Office.Interop.Word.Fields Field in document.Fields)
{
if (Field.Code.Text.Contains("test"))
{
Field.Select();
application.Selection.TypeText("Name")
}
}
Word打开但字段未更改
我很乐意帮助
谢谢
Word opens but the fields are not changed
I would be glad about help
Thank you
推荐答案
这篇关于在项目中集成Word的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!