图片单独上传 (word)

Word.ApplicationClass wordApp=new ApplicationClass();

object file=path;

object nullobj=System.Reflection.Missing.Value;  

Word.Document doc = wordApp.Documents.Open(

ref file, ref nullobj, ref nullobj,  

ref nullobj, ref nullobj, ref nullobj,  

ref nullobj, ref nullobj, ref nullobj,  

ref nullobj, ref nullobj, ref nullobj);

doc.ActiveWindow.Selection.WholeStory();

doc.ActiveWindow.Selection.Copy();

IDataObject data=Clipboard.GetDataObject();

string str=data.GetData(DataFormats.Text).ToString();

doc.Close();

来自 <http://bbs.csdn.net/topics/350197270>

posted @ 2016-12-21 11:12  爱笑的3  阅读(215)  评论(0编辑  收藏  举报