Splitting Multi-page Tiff Images into Separate Pages for Including on a Word Document

R

Randy

Does anyone know how to split a multi-page TIFF image into separage
images using Visual Basic? I cannot figure out how to do this. I need
the images separated so that I can include each image after a line of
text in a Word document.

I have tried using the ImgAdmin and ImgEdit OCX facilities but cannot
find any documentation on the methods and properties. Everything I have
tried with these OCXs results in the first page, and only the first
page, of the multi-page Tiff being placed in the word document.
Subsequent pages of a multi-page Tiff do not show up in the word
document.

I know enough VB to be dangerous but not brilliant. Go easy on the
complexity.
 
A

Alex Feinman [MVP]

If you have Office XP or newer, you can use MODI (Microsoft Office Document
Imaging) -

Dim docSrc, i, image, docDst
set docSrc = CreateObject("MODI.DOcument")
docSrc.Create WScript.Arguments(0)
WScript.Echo "Total pages: " & docSrc.Images.Count
for i = 0 to docSrc.images.count - 1
set docDst = CreateObject("MODI.DOcument")
Dim dstName
dstName = "out" & i & ".tif"
WScript.Echo "Creating file " & dstName
docDst.Create
docDst.Images.Add docSrc.Images(i), Nothing
docDst.SaveAs dstName, 1, 1
next

More here:
http://msdn.microsoft.com/library/d...en-us/Mspauto/html/WelcomeMODI_HV01135783.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top