求助,怎么将指定文件夹的图片插入这个WORD2007内
Private Sub Command5_Click()Dim L1 As Double, L2 As Double, L3 As Double
L1 = Text11.Text
L2 = Text12.Text
L3 = Text13.Text
Label54.Caption = L1 + L2 + L3
Label55.Caption = L1 * L2 * L3
Label58.Caption = Text9.Text
Label59.Caption = Text10.Text
Dim wordObj
Set wordObj = CreateObject("Word.Application")
With wordObj.Documents.Open("E:\编程\计算书模板\1+1.docx")
CommonDialog1.Filter = "Word文档(*.docx)|*.docx" '存储文件
CommonDialog1.ShowSave
If CommonDialog1.FileName = "" Then
K1 = 3
Else
With .Content
.Find.MatchCase = True
.Find.Execute "{cd1}", , , , , , , , , Text11, 2
.Find.Execute "{cd2}", , , , , , , , , Text12, 2
.Find.Execute "{cd3}", , , , , , , , , Text13, 2
.Find.Execute "{cd4}", , , , , , , , , Label54, 2
.Find.Execute "{cd5}", , , , , , , , , Label55, 2
.Find.Execute "{cd6}", , , , , , , , , Label58, 2
.Find.Execute "{cd7}", , , , , , , , , Label59, 2
End With
.SaveAs CommonDialog1.FileName
End If
End With
wordObj.quit
End Sub
这个程序已经可以实现我单击command5弹出一个保存的界面,然后保存即可。
打开保存的word {cd1-7}已经用算好的数据替换好了 我想在该word居中位置先插入一张指定图片 不知道该加什么代码
图片位置 C:\Users\Administrator\Desktop\捕捉和数据库\捕获.GIF
求大神指导
或者有什么其他办法都可