准备工作: 1.首先需要提供一个word模板,并且标记好您要插入书签的位置,定义书签的命名.如图 2.模拟您要插入的Excel原始数据和图表对象 插入代码如下: Private Sub CommandButton1_Click() Dim App, WrdDoc, Mypath As String On Error Resume Next '定义原始模板的储存路径,默认和excel在同一路径 Mypath = ThisWorkbook.Path & "\模板.doc" '用Se…
using System; using System.Collections.Generic; using System.Text; using Microsoft.Office.Interop.Excel; using System.IO; using System.Reflection; using System.Runtime.InteropServices; using Microsoft.Office.Core; namespace HustCAD.IntePLM.Win.BatchE…