Inserting pictures in a word document launched from another application
I am trying to create a word document from MS Access which inserts a picture into it. The below code triggers an error at the the last statement. Can anybody tell me what is going on?
Thanks
Dim wdApp As Word.Application
Dim As Word.Document
Dim shp As Shape
Set wdApp = CreateObject("Word.APPLICATION")
wdApp.Visible = True
Set wdDoc = wdApp.Documents.Add
Set shp = wdDoc.ActiveWindow.Selection.InlineShapes.AddPictu re(FileName:="C:\MyPicture.jpg", LinkToFile:=False, SaveWithDocument:=True).ConvertToShape
|