With Office 2003 Microsoft Office Document Image

J

JC

I want to programatically open an MSWord doc and save it as a Tiff. The
following code works if I call it as a macro within the MSWord application,
but not if I run it from my VB application. When i run this code in my VB App
it saves the file as a very large tif and when i try to open the tif i get an
error message that says "The selected file is not a valid Microsoft Office
Document Imaging File."

Anybody see what i'm doing wrong? Thanks Joan

Dim oword As New Word.Application
oword.Documents.Open "C:\test2.doc"

oword.PrintOut filename:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0, OutputFileName:="C:\xx.tif"
 

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