+ Reply to Thread
Results 1 to 4 of 4

How to combine these two set's of codes?

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    How to combine these two set's of codes?

    Hello All,
    A rather unusual question for y'all. I have two set's of code that work perfectly fine individually but I am not sure how to combine them.
    First bit of code, loops through the network printers and select's CutePDF as the default printer.


    Please Login or Register  to view this content.

    Second does the actual printing (creating PDF's)

    Please Login or Register  to view this content.



    When I added the first one ahead of the second one, I get an Compile Error: Expected End Sub. what am I doing wrong and what changes should I make so the it runs as expected?
    loops thru and find the CutePDF printer
    execute the print command?


    Please Login or Register  to view this content.
    Thanks,
    Aadesh Gandhi

  2. #2
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: How to combine these two set's of codes?

    Just call the fnSetCutePDFPrinter in the PrintAsPDF2 like the red text:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: How to combine these two set's of codes?

    Quote Originally Posted by Yraen View Post
    Just call the fnSetCutePDFPrinter in the PrintAsPDF2 like the red text:
    Please Login or Register  to view this content.
    Hello Yraen,
    It did work. Thanks for your help!



    Aadesh Gandhi

  4. #4
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: How to combine these two set's of codes?

    You're welcome. Thanks for the rep.

+ 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