View Single Post
  #2 (permalink)  
Old January 30th, 2007, 03:16 PM
hexOffender hexOffender is offline
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have cobbled together this code so far:

 Dim FileName As String
        Dim image As String = "Image"

        AcroXApp = CType(CreateObject("AcroExch.App"), Acrobat.CAcroApp)
        'Removing toolbar buttons from the user interface
        With AcroXApp
            .ToolButtonIsEnabled("SaveAS")
            .ToolButtonRemove("Save")
            .ToolButtonRemove("Open")
            .ToolButtonRemove("AcroForm:WidgetTool")
        End With
        AcroXAVDoc = CType(CreateObject("AcroExch.AVDoc"), Acrobat.CAcroAVDoc)
        FileName = "C:\Image.pdf"
        AcroXAVDoc.Open(FileName, "Acrobat")

        AcroXPDDoc = CType(AcroXAVDoc.GetPDDoc, Acrobat.CAcroPDDoc)
        AcroXPDDoc.ClearFlags(&H1) 'Keep Acrobat from querying a file save when component closes

        AcroXApp.Show()
        AcroXApp.MenuItemExecute("SaveAs")

        AcroXApp.Hide()
        'SetParent(AcroHandle, 0)
        AcroXAVDoc.Close(0)
        AcroXApp.CloseAllDocs()
        AcroXApp.Exit()


I can open the SaveAs Dialogue, but How can I populate it with the filename I want("Image.tiff"). And then I wuld like to have this done without showing the Acrobat screens.

Reply With Quote