C#实现图片导入word
怎么样实现啊? 现在图片的路径是放在数据库中的 要做的是随着其它内容的导出到word 把图片也导出到word中
希望大家帮忙 谢谢了
------解决方案--------------------有个AddPicture的函数
object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc "; /* \endofdoc is a predefined bookmark */
object name= "d:\\myfile.doc ";
object Range=System.Reflection.Missing.Value;
//Start Word and create a new document.
Word.Application oWord;
Word.Document oDoc;
oWord = new Word.ApplicationClass();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing, ref oMissing);
oWord.Selection.Font.Bold = 1;
oWord.Selection.Font.Size=18;
oWord.Selection.ParagraphFormat.Alignment =Word.WdParagraphAlignment.wdAlignParagraphCenter;
oWord.Selection.InlineShapes.AddPicture( "e:/wzxsjs/picture/xczp/2005/02/K330206980000200501000201.jpg ",ref oMissing,ref oMissing,ref Range);