Quote:
Originally Posted by shaiful
Hi all, I have a problem to convert PDF from excel file, i have installed PDF printer and i can make PDF file from excel by manually, I want to make it programetically in VB6. i made a set of code which is working but it sending to Physical printer printer directly, the code
Dim xlapp As excel.Application
Dim xlbook As excel.WorkBook
Dim xlsheet As excel.WorkSheet
Set xlbook = GetObject("d:\TEST.xls")
Set xlapp = xlbook.Parent
xlapp.Visible = True
xlapp.Windows("TEST.XLS").Visible = True
Set xlsheet = xlbook.Sheets("Sheet1")
xlsheet.PrintOut , , 1, , "\\server\ADOB PDF"
Pls give me advice where i did mistake, thx advance 4 ur time.
Make the PDF printer as the default printer of your system.
Check if the PDF printer you have installed provides any programmable objects. If so then add that to your references in your project and do it via this route.