下面是我的範例 可以不指定圖片代入word音檔圖片預設值?
- Code: Select all
Document doc = new Document();
Section section = doc.AddSection();
Paragraph para1 = section.AddParagraph();
Stream s1 = File.OpenRead(@"C:\test3\1.mp3");
DocPicture pic1 = new DocPicture(doc);
pic1.LoadImage(Image.FromFile(@"C:\test3\00.jpg"));
pic1.Width = 10f;
pic1.Height = 10f;
para1.AppendOleObject(s1, pic1, "mp3");
doc.SaveToFile(@"C:\test3\1.doc", FileFormat.Doc);