• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Send Multiple PDF by Outlook Email from Excel|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Send Multiple PDF by Outlook Email from Excel|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosSend Multiple PDF by Outlook Email …
sp_PrintTopic sp_TopicIcon
Send Multiple PDF by Outlook Email from Excel
Avatar
Yousef Qaroos
Member
Members
Level 0
Forum Posts: 12
Member Since:
April 27, 2020
sp_UserOfflineSmall Offline
1
April 27, 2020 - 5:41 pm
sp_Permalink sp_Print sp_EditHistory

Good day Philip, 

I have almost an excel file as the one you work in it there,  

my file has drop down list in sheet1 AM1

that's data coming from Index B2:B26

 

*could you please modifie the macro to be suite to me

 

also please let all PDFs be attached in one single mail 

if there are no customer name let the macro not create PDF and see the next one 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1516
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
April 28, 2020 - 12:31 pm
sp_Permalink sp_Print

Hi Yousef,

Please start your own topic, don't tag on to the end of an existing one 🙂

Attached is a workbook that does what you requested.  I've unmerged cells AM1:AO1. Merged cells are not good.

https://www.myonlinetraininghu.....-cells-vba

Regards

Phil

Avatar
Yousef Qaroos
Member
Members
Level 0
Forum Posts: 12
Member Since:
April 27, 2020
sp_UserOfflineSmall Offline
3
April 29, 2020 - 12:32 pm
sp_Permalink sp_Print

Thank you so so so so much for your assistance. You really came through, The extra effort you put in was really appreciated and thank you again for taking time out to answer my question the other day. I am sure that you are busy, and I appreciate you taking the time to respond personally to me. the macro fit my requirements as gloves but some time get bug due to the PDF titles and when I change the cell that containing the title it work for a while then stop again after I generate two massage,  how it fixed? and Thank you again and again.

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1516
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
April 29, 2020 - 2:32 pm
sp_Permalink sp_Print

You're welcome Yousef.

Not sure what is causing your bugs without seeing the code you have changed.

Could be invalid characters in the filenames or could be it's looking for a path that doesn't exist

Please attach your workbook if you want me to check it, and a screenshot of the error and a screenshot of the highlighted line (in yellow) that the code stops at.

Regards

Phil

Avatar
Yousef Qaroos
Member
Members
Level 0
Forum Posts: 12
Member Since:
April 27, 2020
sp_UserOfflineSmall Offline
5
April 30, 2020 - 1:47 am
sp_Permalink sp_Print

its look like that I choice cell that containing an unacceptable PDFs name, Is there any criteria to follow?  may be the length of the name is more than 64 characters ? 

Avatar
Yousef Qaroos
Member
Members
Level 0
Forum Posts: 12
Member Since:
April 27, 2020
sp_UserOfflineSmall Offline
6
April 30, 2020 - 3:03 am
sp_Permalink sp_Print sp_EditHistory

It's ok now,  I found the mistake in the cell that contain " and that could not be a part of any files name. 

 

another thing I would like to add a condition to let macro control creating unnecessary PDF file, if range("AH11"). value = "Not Active" then the macro should do the same thing if there is no name in DV. value

not making the PDF for this name and look for the next name 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1516
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
7
April 30, 2020 - 8:08 am
sp_Permalink sp_Print

Hey Yousef,

Did you try doing that yourself?  🙂  It only took another IF .. THEN statement - see attached.

Regards

Phil

Avatar
Yousef Qaroos
Member
Members
Level 0
Forum Posts: 12
Member Since:
April 27, 2020
sp_UserOfflineSmall Offline
8
April 30, 2020 - 7:09 pm
sp_Permalink sp_Print

I don’t know what to say except THANK YOU!

You’re so right and bright on every single point!

I do take this experience as my strength! I guess I’m just scared to destroy the macro because sometimes the enhancment idea pops up in my head every now and then I don't start to implement it as I explained I know myself so much and I won’t allow myself to act and destroy others activities!

Thank you again for your very useful hand touches! Thankfully yes, I am in a much better place now and I am ofcoures headed in the right direction!

I will be very glad when you accept my invitation to had dinner together , don't be shy and let's meet up someday

I also wish you the very best on your life journey! Thank you again for reading and for understanding!

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1516
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
9
May 1, 2020 - 10:15 am
sp_Permalink sp_Print

No worries Yousef.  Maybe when we're all out of lockdown you can buy me a take-away 🙂

Don't be afraid to try some code modifications.  You can always back-up the file before you make any changes.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Dieneba NDIAYE, Alexandra Radu, Monique Roussouw
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Sopi Yuniarti
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
Forum Stats:
Groups: 3
Forums: 24
Topics: 6216
Posts: 27250

 

Member Stats:
Guest Posters: 49
Members: 31897
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.