Hi Friends,

I'm having a trouble in these 3 codes. I'd like to integrate the code of Dinesh Takyar and the code from Rondebruin and the code from an attachment but I'm stuck in incorporating these codes into one.

What I want to happen is that:[LIST=1][*]I'll be able to send emails to different recipients with different worksheets
  • For example: in the Master File, named, "Outdated", the recipient, 21 QUEEN REALTY & BROKERAGE has 2 names in the supplier column BUT if you check their rows it has different values.
    What will happen is that this will be put in one worksheet (parsing the data). The same will happen with the others in the Supplier column).
    After this will be put in one worksheet, this worksheet will be sent out to the email of 21 QUEEN REALTY & BROKERAGE ie. in the last column BUT in the column of email addresses (Column O) it is the same like the Supplier column wherein it is duplicated or it just don't occur once but many times.
    Lastly, the excel worksheet will be sent as an attachment to the recipient.
  • In the sample attachment, you will see the tab, SalesRpt. That sample template is what I want to use with the message I want to tell to the recipient and the data for the worksheet(s).
  • The recipient may be one or many. The same goes for the sender, it may be one or many.
    • There will be like a Menu that can be setup the sender(s)' email address(es) or one sender then use either BCC or CC. Also the content, subject will be setup in the same menu.
      Just like the code in the attachment: emailtestfile 2.xlsm.
    • There will be a copy of the excel worksheet on the folder I want to use (able to browse just like when saving any file, we will be prompt on where to save the file).

These are the problems I encountered when I setup the file:
  • The file keeps on crashing that's why I need help so I am now starting from scratch.
  • I tried on integrating the 3 codes but I'm having a hard time because one code is that the subject, body, sender and recipient cannot be edited because it is inside the module, it is not linked to any cell or range. The other one is linked to outlook and the attachment(s) are in pdf. I tried to change the xltypePDF to xltypeXLS or xltypeXLSX but to no avail, it is not working. The other one, I tried using the codes' attachment: Attachment 389737 but I'm having a hard time in changing it even the template when it is being sent out.


These are the codes that I find useful for the output that I want:
From Dinesh Takyar:
Please Login or Register  to view this content.

Code from Rondebruin:
Please Login or Register  to view this content.



Code from the attachment: emailtestfile 2.xlsm
In Module: modFiles
Please Login or Register  to view this content.

In Module: modNav
Please Login or Register  to view this content.
Please see my file in this link: https://www.dropbox.com/s/lnsbdxo9di...mple.xlsm?dl=0