Hi,
I'm having some problems with embedding multi-page .tif files (generated from a Kodak i260 scanner) into a Word doc. The code below works fine in every respect, other than it only picks up page 1. Can anyone help?
Thanks, Iain
I'm having some problems with embedding multi-page .tif files (generated from a Kodak i260 scanner) into a Word doc. The code below works fine in every respect, other than it only picks up page 1. Can anyone help?
Code:
Sub Test_Pickup_Scanned_Documents()
'======================================
'Embeds scanned .tif file into word doc
'======================================
Dim appWD As Word.Application
Dim fso As FileSystemObject
Dim flScannedDocument As file
'Grab the scanned document
Set fso = New FileSystemObject
Set flScannedDocument = fso.GetFile("\\LDS-1101\Document Output\577952\120050526160103.tif")
'Instantiate a new instance of Word and hide it from the user
Set appWD = New Word.Application
appWD.Visible = False
'Open the template file
appWD.Documents.Open "C:\Test.doc"
'---------------
'Embed the image
'---------------
'Select the bookmark placholder
appWD.ActiveDocument.Bookmarks("PictureHere").range.Select
'Add the image
appWD.Selection.InlineShapes.AddPicture FileName:=flScannedDocument, LinkToFile _
:=False, SaveWithDocument:=True
'Save & close the document
appWD.ActiveDocument.Save
appWD.ActiveDocument.Close
'Exit Word
appWD.Quit
'Release the object
Set appWD = Nothing
End Sub
Thanks, Iain