View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
JC
 
Posts: n/a
Default With Office 2003 Microsoft Office Document Image

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"