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.
|