+ Reply to Thread
Results 1 to 5 of 5

VBA to print to Adobe

  1. #1
    Registered User
    Join Date
    09-28-2010
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    12

    VBA to print to Adobe

    I am trying to write VBA code to automitically print to an ADOBE file.
    I am somewhat familiar with VBA, but most of my experience is with Active Controls and User Menus and I have VERY limited experience with Adobe. I am saying this, because I have searched for examples online, and cannot get any of them to work. Probably because I am not properly defining the post script files etc...
    One example:

    Private Sub CommandButton1_Click()
    Dim oSheet As Worksheet
    Dim oPDF As PdfDistiller ( I get an error here)
    Dim TmpPSFile As String
    Dim PDFFile As String
    Set oSheet = ActiveSheet
    Set oPDF = New PdfDistiller
    TmpPSFile = "c:\TmpPSFile.ps"
    PDFFile = "c:\" & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & "_" & ActiveSheet.Name & ".pdf"
    oSheet.PrintOut copies:=1, preview:=False, _
    ActivePrinter:="Acrobat Distiller", printtofile:=True, _
    collate:=True, PrToFileName:=TmpPSFile
    oPDF.FileToPDF TmpPSFile, PDFFile, ""
    Kill TmpPSFile
    End Sub

    I am using Adobe Acrobat/Distiller 8. Notes say to "Do not send fonts to Distiller" Option, but I cannot find that option within Distiller.

    I am just looking for something very simple. I print about 20-25 reports out of my macro enabled worksheets a day - and just have to convert so supervisors can open with their IPADS.
    Thank You,
    Todd

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: VBA to print to Adobe

    Don't forget to edit your post and add the code [tags] [/tags]

    In Adobe, Look under Edit/Preferences and uncheck the checkbox(in the center of the page)
    Last edited by shg; 03-04-2011 at 03:18 PM.
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Registered User
    Join Date
    09-28-2010
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: VBA to print to Adobe

    Quote Originally Posted by jwright650 View Post
    Don't forget to edit your post and add the code [tags] [/tags]

    In Adobe, Look under Edit/Preferences and uncheck the checkbox(in the center of the page)
    Hey John,
    Thank you for response. However, I think adding the code tags is what I need help with.
    The majority of macros I write are dealing with UserForms, Manipulating formulas, importing data etc...
    I have very limited experience with "DIM" and "Set" statements.
    Any additional help would be greatly appreciated.
    Thank you,
    Todd

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VBA to print to Adobe

    I think adding the code tags is what I need help with.
    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: VBA to print to Adobe

    Quote Originally Posted by Bhawxfan View Post
    I think adding the code tags is what I need help with.
    Hi Todd,
    To add the code tags, go back to your initial post and choose Edit, then in the window add these code tags to remain in compliance with the forum's rules.

    [ code] around your code in your post [ /code] (without the space)

    I use Adobe 8 also....I'll help where I can.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1