Word文档导出图片
如题,如何将Word文档中的所有图片导出。
[解决办法]
没做过帮顶
[解决办法]
帮顶下
[解决办法]
是啊 是啊
同问 同问 顶上去~~!
[解决办法]
不知道
[解决办法]
在工程中引用Word,打开文件,使用Word对象集合中的InlineShapes获得图像对象集合,再进行处理即可。
[解决办法]
帮顶
[解决办法]
没作过,就帮楼住顶下,人气
[解决办法]
帮顶下
[解决办法]
接分
[解决办法]
随后发给你。
[解决办法]
楼主,别忘了把关键代码整出来
[解决办法]
很简单 把他存为HTML 然后得到一个目录 遍历目录的图片 然后在删掉这个目录和HTML文件
[解决办法]
DOC另存为HTML的代码
public string DocToHtml(string inFileName, string outFileName)
{
string OutPut = " ";
object fileName = inFileName;
object fileSaveName = outFileName;
object vk_read_only = false;
object vk_visible = true;
object vk_true = true;
object vk_false = false;
object vk_dynamic = 2;
object missing = System.Reflection.Missing.Value;
object vk_range = missing;
object vk_to = missing;
object vk_from = missing;
Word.ApplicationClass vk_word_app = new Word.ApplicationClass();
Word.Document aDoc = null;
try
{
aDoc = vk_word_app.Documents.Open(
ref fileName, ref missing, ref vk_read_only,
ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref vk_visible, ref missing, ref missing, ref missing, ref missing);
}
catch
{
OutPut += "There was a problem opening file!\n ";
}
try
{
//Get the word saveas format from the myItem object we got from the save as combo box selected item
object vk_saveformat = Word.WdSaveFormat.wdFormatFilteredHTML;
aDoc.SaveAs(ref fileSaveName, ref vk_saveformat, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing);
}
catch
{
OutPut += "Error ! ";
}
if (aDoc != null)
{
aDoc.Close(ref vk_false, ref missing, ref missing);
}
vk_word_app.Quit(ref vk_false, ref missing, ref missing);
vk_word_app = null;
GC.Collect();
GC.WaitForPendingFinalizers();
return OutPut;
}
[解决办法]
你的mail多少?分我不要了。白送你。