使用以下语句就可以将word文档转换成图片,但是实在没能找到如何设置图片的大小,希望各位大侠帮忙!!Document doc = new Document("F:\\123.doc");
doc.Save("F:\\123.jpg");测试工程+DLL 下载地址:http://download.csdn.net/detail/shi0090/4076038

解决方案 »

  1.   

    在HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\Options下增加ExportBitmapResolution(DWORD值),11.0针对2003,12.0针对2007
    可选值分别是: 50,96(Default), 100, 150, 200, 250, 300.对应关系如下(dpi->pixel):50 500×375
    96 960×720
    100 1000×750
    150 1500×1125
    200 2000×1500
    250 2500×1875
    300 3000×2250
    设为300后启动PowerPoint另存为png,出来的图片分辨率是3000×2250。PowerPoint SaveAs PNG
    解决PowerPoint保存图片文字锯齿问题
    这是我和PowerPoint斗争的笔记,你看看有没有参考价值
      

  2.   


    Document doc = new Document("f:\\333.doc");
    ImageSaveOptions iso = new ImageSaveOptions(SaveFormat.Png);
    iso.Resolution = 128;
    doc.Save("f:\\333.png", iso);
    最终还是自己研究出来鸟,哈哈,翻遍了所有类。不过有遇到一个问题,这个doc.Save()只能保存第一页为图片,囧....继续研究去!
      

  3.   

    这个doc.Save()只能保存第一页为图片,囧.... 如何多页呀,求指导
      

  4.   

    解决了吗?
     ImageSaveOptions iso = new ImageSaveOptions(SaveFormat.Jpeg);
                iso.PrettyFormat = true;
                iso.UseAntiAliasing = true;
                for (int i = 0; i < doc.PageCount; i++)
                {
                    iso.PageIndex = i;
                    doc.Save("D:/test/test" + i + ".jpg", iso);
                }
    这样倒是可以导出N张图片,每页一张。我希望能做到一个word一张。可以实现 吗?