Hi
I have an app that opens and inserts a photo into a word template. The problem is inserting the photo the photo resides on a storage device attached to the network. I'm using a mapped drive and I get an error message saying it is not a valid file name.
this is the code
Any help would be greatly appreciated.
I have an app that opens and inserts a photo into a word template. The problem is inserting the photo the photo resides on a storage device attached to the network. I'm using a mapped drive and I get an error message saying it is not a valid file name.
this is the code
Code:
Dim objWordApplication As New Application
Dim objDocument As New Word.Document
objDocument = objWordApplication.Documents.Add (OTemp)
Dim v_range As Word.Range
v_range.InsertParagraph()
'
With objWordApplication.Selection
.InlineShapes.AddPicture( _
filename:="Z:\winter.jpg", _
LinkToFile:=False, _
SaveWithDocument:=True, _
Range:=v_range)
End With