Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 33

Thread: Email completed PDF

  1. #11


    Register for a FREE account, and/
    or Log in to avoid these ads!

    Ken,
    Here is the complete file I'm working with. If you look under Add-ins on the tool bar you will see the option to print to pdf. This will open up the user form.

    Randall
    Attached Files Attached Files

  2. #12
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,344
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Give this a go and let me know if it works.
    Attached Files Attached Files
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #13
    Ken,
    I changed the code to send the email before the early exit, but it will not open the preview for outlook. It has not given any errors either. Here is the workbook I'm using.

    Thanks again!
    Randall
    Print and Email PDF v1.4.xlsm

  4. #14
    I tried the file you sent and it still will not open outlook for preview.......

  5. #15
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,344
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Hi Randall,

    I'm curious... did you start this project or are you maintaining it? Don't take offense, but I'm just trying to get a gauge on your coding level here.

    I assumed that you were calling the PrintToPDF routine I was coding, but I just stepped through your userform and it's not... which means that you've got a bigger issue here as the userform routine needs to be adjusted...

    To do it correctly, I think we should talk about your logic a bit and make sure we do it correctly.

    First thing though... how much code have you written, and how are your debugging skills? Do you know how to set breakpoints and step through code?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  6. #16
    Ken,
    To be honest, I'm a beginner at coding, "I know enough to mess it up". This is a project for work. I was searching the web and came across the code that you had written and then found where another coder had built the userform for it.

    Basically, I need a system for our guys in the field to work in excel select the sheets they need to print to a pdf and have that pdf automatically sent via email to an address. I thought a userform would best suit this situation, since it gave them the option to select the sheets they need, it changes depending on the job.

    How bad is it messed up?

    Randall

  7. #17
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,344
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    It's bad, Randall... real bad...

    No, I'm just kidding. The calls were a based on a very old version of the code I had, and it's been hacked apart pretty bad. Beyond that, the biggest thing I saw was that you didn't know where to put the code.

    I've fixed it up for you. You can delete Module3, as you don't need it.

    If you're going to do any amount of coding, I HIGHLY recommend that you learn some debugging skills, and fast. You need to know the following:
    • Setting/clearing Breakpoints
    • Stepping through code
    • Setting watches
    It would also be a good idea to learn about the locals and immediate windows.

    VBA is a huge field, and awesomly powerful, but you need some base knowledge to really get a good grasp and move forward. I'm happy to help you with that, if you like.

    Test this out, and let me know,
    Attached Files Attached Files
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  8. #18

    Ken,
    Thank you so much!!!!! It works great. Now for a stupid question. Since we deleted module 3 where do I edit the email address?

    I would love to learn more as it would make my job a lot easier. Plus it's just "cool". Any info your willing so share I'm willing to learn.

    I will be in Vancouver for work in March. I owe you the biggest steak you want!!

    Thanks again
    Randall

  9. #19
    found the email in the userform

  10. #20
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,344
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    LOL!

    You may want to code something for your UserForm_Initialize event to get the correct location to the user's desktop folder to show up when the userform opens too. That messed me up for a bit.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Posting Permissions

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