Microsoft.Office.Interop.Word.dll
Microsoft.Office.Interop.Word.dll 事例如 object Nothing = System.Reflection.Missing.Value; object srcFileName = @"D:\aa.html"; object dstFileName = @"d:\li.doc"; object objt = true; Word.Application wordApp = new Word.ApplicationClass(); Word.Document wordDoc = null; object format = Word.WdSaveFormat.wdFormatDocument; try { wordDoc = wordApp.Documents.Open(ref srcFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); //图片 Word.Shape oShape = wordDoc.Shapes.AddPicture("D:\\DL_01.gif", ref Nothing, ref objt, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); oShape.WrapFormat.Type = Word.WdWrapType.wdWrapSquare; //将htm文件save as成doc文件 wordDoc.SaveAs(ref dstFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); } finally { wordDoc.Close(ref Nothing, ref Nothing, ref Nothing); wordApp.Quit(ref Nothing, ref Nothing, ref Nothing); } }
- 粉丝: 1
- 资源: 3
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
- 1
- 2
- 3
- 4
- 5
- 6
前往页