sql中的二进制图片导出到word中
请教各位,如何将sql数据库中以二进制流保存的图片直接导出到word文件中?求教C#代码。 --------------------编程问答-------------------- 将二进制流读出来图片到指定的文件夹下,然后
利用函数
oWord.Selection.InlineShapes.AddPicture(ref name,ref LinkToFile,ref SaveWithDocument,ref Range);
object oMissing = System.Reflection.Missing.Value;
object Range=System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
object name= "d:\\myfile.doc"; //你的文件名称
Word.Application oWord = new Word.ApplicationClass();
Word.Document oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing, ref oMissing);
oWord.Visible = true; //打开
oWord.Selection.InlineShapes.AddPicture("e:/picture/123.jpg",ref oMissing,ref oMissing,ref Range);//插入图片
oWord.Selection.InlineShapes.Height=InchesToPoints(0.85);
oWord.Selection.InlineShapes.Width =InchesToPoints(0.75);
给你地址看看
--------------------编程问答--------------------
为什么存放在数据库中的是二进制图片,不是路径 --------------------编程问答--------------------
+2 正解 --------------------编程问答-------------------- 如何将数据库中的图片和文字全部导入到word中 --------------------编程问答-------------------- 可以写详细一点吗
补充:.NET技术 , C#