1.在word中双击图片,设置图片格式,选择“版式”--〉“衬于文字下方” 这种模式图片的位置随便调,
还有好多种版式的设置,进去试一下啦!

解决方案 »

  1.   

    //如何增加图片

    //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 ;
    //设置图片属性
      

  2.   

    //oWordApp.Selection.ShapeRange.PictureFormat.ColorType = msoPicmsoPictureAutomatictureAutomatic;
    这个语句是用来设置 悬浮在文字上面 的跟中msoPicmsoPictureAutomatictureAutomatic的只为 1 
    但是直接定义
    const int msoPicmsoPictureAutomatictureAutomatic = 1 ; 
    代码写成
    oWordApp.Selection.ShapeRange.PictureFormat.ColorType =msoPicmsoPictureAutomatictureAutomatic 
    提示错误。