如何使用C#单词自动隐藏单词文档/应用程序? [英] How to hide word document/application using C# word automation?

查看:145
本文介绍了如何使用C#单词自动隐藏单词文档/应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii朋友,
我目前正在使用Office 2010进行办公室自动化项目.我有一个主要的excel文件,我从中获取数据并打开word应用程序和文档对象,并将word文档中存在的每个字段的数据放入其中.因此,它会使每个记录的字文件数增加.创建Word文件时,它会显示在桌面窗口中.我必须将其隐藏起来.我还设置了application.visible = false;但它显示了窗口.因此,请给我正确的解决方案以隐藏窗口.

Hii friends,
I am currently working on office automation project using office 2010. I have one master excel file, from which i pick up data and opening word application and document object, put data for each field present on word document. So it makes number of word files for each record. While creating word files, it appears in desktop window. I have to hide it from being displaying. I also set application.visible=false; but it shows the window. so please give me correct solution to hide window.

推荐答案

您确定设置了单词application的可见属性吗?在excel的上下文中,应用程序指的是excel本身.
Are you sure you set visible property of the word application? In the context of excel, application refers to excel itself.
Word.Application.Visible = false


祝你好运!


Good luck!


这篇关于如何使用C#单词自动隐藏单词文档/应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆