如何把图片放到指定的WORD位置,如何设置该位置的图片的板式为 悬浮在文字上面 1.在word中双击图片,设置图片格式,选择“版式”--〉“衬于文字下方” 这种模式图片的位置随便调,还有好多种版式的设置,进去试一下啦! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //如何增加图片 //const int msoPictureAutomatic = 1; object oMissed = System.Reflection.Missing.Value; object oLinkToFile = false; object oSaveWithDocument = true; string sBitmapFile = @"c:\TestImage.jpg"; object What = System.Reflection.Missing.Value; object Which = System.Reflection.Missing.Value; object Name = System.Reflection.Missing.Value; object Count = 2;//本来打算是把焦点设置到想要放置图片的地方。 oWordApp.Selection .GoTo (ref What,ref Which,ref Count,ref Name); oWordApp.Selection.InlineShapes.AddPicture(sBitmapFile,ref oLinkToFile,ref oSaveWithDocument,ref oMissed); //oWordApp.Selection.ShapeRange.PictureFormat.Brightness = (float)0.5; //oWordApp.Selection.ShapeRange.PictureFormat.ColorType = msoPicmsoPictureAutomatictureAutomatic; //oWordApp.Selection .ShapeRange .PictureFormat .ColorType = Microsoft.Office .Core .MsoPictureColorType .msoPictureAutomatic ; //设置图片属性 //oWordApp.Selection.ShapeRange.PictureFormat.ColorType = msoPicmsoPictureAutomatictureAutomatic;这个语句是用来设置 悬浮在文字上面 的跟中msoPicmsoPictureAutomatictureAutomatic的只为 1 但是直接定义const int msoPicmsoPictureAutomatictureAutomatic = 1 ; 代码写成oWordApp.Selection.ShapeRange.PictureFormat.ColorType =msoPicmsoPictureAutomatictureAutomatic 提示错误。 好大一枚难题,求指教!(xml查询的) 小妹继续请教WinFrom上下滚动效果问题。 线程同步,和cache一致性的疑惑 begininvoke了的线程想立即强行终止,有啥办法啊? 如何让Windows服务显示一个Form与用户交互,在线等 在Winform的程序中,如何在服务器上动态创建目录。 数组里项大小排序 c#与xml的图片等文件存储问题? 读取XML的问题 读数据库表问题。 各位朋友,谈谈你们刚学习c#的心情 连接问题
//const int msoPictureAutomatic = 1;
object oMissed = System.Reflection.Missing.Value;
object oLinkToFile = false;
object oSaveWithDocument = true;
string sBitmapFile = @"c:\TestImage.jpg";
object What = System.Reflection.Missing.Value;
object Which = System.Reflection.Missing.Value;
object Name = System.Reflection.Missing.Value;
object Count = 2;
//本来打算是把焦点设置到想要放置图片的地方。
oWordApp.Selection .GoTo (ref What,ref Which,ref Count,ref Name);
oWordApp.Selection.InlineShapes.AddPicture(sBitmapFile,ref oLinkToFile,ref oSaveWithDocument,ref oMissed);
//oWordApp.Selection.ShapeRange.PictureFormat.Brightness = (float)0.5;
//oWordApp.Selection.ShapeRange.PictureFormat.ColorType = msoPicmsoPictureAutomatictureAutomatic;
//oWordApp.Selection .ShapeRange .PictureFormat .ColorType = Microsoft.Office .Core .MsoPictureColorType .msoPictureAutomatic ;
//设置图片属性
这个语句是用来设置 悬浮在文字上面 的跟中msoPicmsoPictureAutomatictureAutomatic的只为 1
但是直接定义
const int msoPicmsoPictureAutomatictureAutomatic = 1 ;
代码写成
oWordApp.Selection.ShapeRange.PictureFormat.ColorType =msoPicmsoPictureAutomatictureAutomatic
提示错误。