GregoryNelson
New Member
- Joined
- Feb 25, 2011
- Messages
- 1
This is probably old hat to many - I also have to use Excel and Word 2003.
My Excel app instantiates a WordTemplate.doc and writes data to bookmarks and tables OK.
However there is an Image file in Word that I need to load with an image/path and I cannot stumble on the correct way to address that control.
Can anyone help? My code reads:
Option Explicit
Dim oWD As Word.Application
Dim oDoc As Word.Document
Public Sub WriteData()
Dim oTable As Word.Table
Dim strPath$
strPath = "C:\DATA\CW-21116..JPG"
Set oWD = CreateObject("Word.Application")
Set oDoc = oWD.Documents.Open("C:\DATA\OrderTemplate.doc")
My Excel app instantiates a WordTemplate.doc and writes data to bookmarks and tables OK.
However there is an Image file in Word that I need to load with an image/path and I cannot stumble on the correct way to address that control.
Can anyone help? My code reads:
Option Explicit
Dim oWD As Word.Application
Dim oDoc As Word.Document
Public Sub WriteData()
Dim oTable As Word.Table
Dim strPath$
strPath = "C:\DATA\CW-21116..JPG"
Set oWD = CreateObject("Word.Application")
Set oDoc = oWD.Documents.Open("C:\DATA\OrderTemplate.doc")