• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Macro written in 32 bit System - Not working in 64 bit System[ Win 10 and Office 2019 Prof]|Page 2|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Macro written in 32 bit System - Not working in 64 bit System[ Win 10 and Office 2019 Prof]|Page 2|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 & MacrosMacro written in 32 bit System - No…
sp_PrintTopic sp_TopicIcon
Macro written in 32 bit System - Not working in 64 bit System[ Win 10 and Office 2019 Prof]
Page: 123Jump to page
Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
21
November 27, 2020 - 11:19 am
sp_Permalink sp_Print

Thanks will try

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
22
November 27, 2020 - 6:25 pm
sp_Permalink sp_Print

We almost there

 

But what I need is each attachment file from the source folder  goes to  specific email recipient.

but the macro seems send all attachment from the folder to all recipient simultaneously, pls help to modify the attach

My meaning as follows :

 

Receiver  Should get ONLY
ng.david.wl@semhk.sharp-world.com RA_HN0B_1120.pdf   as attachment ONLY
chan.mary.me@semhk.sharp-world.com RA_HN0F_1120.pdf   as attachment ONLY
chi.john.yk@semhk.sharp-world.com RA_HN0M_1120.pdf   attachment ONLY
yeung.peter.wm@semhk.sharp-world.com RA_HN0P_1120.pdf  attachment ONLY
ng.danniel.lo@semhk.sharp-world.com RA_HN0T_1120.pdf  attachment ONLY
   
Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
23
November 28, 2020 - 4:58 am
sp_Permalink sp_Print sp_EditHistory

Hello,

new macro was made to send email through Outlook

the macro will analyze each line of the sheet where the mailing lists are

email will be sent to each recipient on each line

only files that are on the corresponding line will be attached to the recipient of each line



if you want to add more than one attachment to the same email, you just have to follow the example I left it ... that is, you have to write as follows

in column ("D"), in the recipient's row: 

file1 path#file2 path#file3 path

C:\Users\...\image1.jpg#C:\Users\...notepad.txt#C:\Users\...\pdf file.pdf



if it's just an email it's just: C:\Users\...\pdf file.pdf


in short, each line is an email with its attachments

Miguel,



Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
24
November 28, 2020 - 6:11 am
sp_Permalink sp_Print

Hello,

I changed the attachment line in this attachment, for each email line to be sent, the attachments will be from column ("D") to column ("J") of the same line

now the choice is yours, the attachment of post 23 or 24


Miguel,
 
Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
25
November 30, 2020 - 10:09 am
sp_Permalink sp_Print

Thanks so much Miguelthe modifications.Will try on that with live samples this week.

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
26
December 2, 2020 - 1:12 pm
sp_Permalink sp_Print

Thanks again Miguel

 

I  try  the macro with live data but found that attached has been attached twice for each mail send, [ pls refer attached screen shot] can you help again to rectify the script.

Also  is it possible to add the "To Email recipient"  from one to five   "CC Email recipient from one to five'" ;"BCC Email recipient from one to five'" 

Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
27
December 2, 2020 - 8:20 pm
sp_Permalink sp_Print

Hello,

sorry, my mistake

change in module1 where the following part is, replace the line with this one in red

If x > 0 Then
     For a = LBound(ArrInput) To UBound(ArrInput) - 1
         ArrOutput = Split((ArrInput(a)), "#")
         On Error Resume Next
         checkD = ArrOutput(0)
         On Error GoTo 0
         If checkD <> "" Then
             If FileExist(checkD) = False Then GoTo nextX:
                 outlEmail.Attachments.Add checkD
         End If
nextX:

 

 

attached corrected file

Miguel,

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
28
December 3, 2020 - 10:46 am
sp_Permalink sp_Print

Thanks millions! Miguel. I did try with live data again, and found perfectly workout.

However ask a bit more can we increase the number of recipient to 5 for each recipient category  i.e 5 To : 5 CC: 5 BCC:  

Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
29
December 3, 2020 - 8:47 pm
sp_Permalink sp_Print

Hello,

update complete, file attached

 

you just need to do the following

when you go to write the email addresses, whether in column ("A") send to, or in column ("B") send CC, or in column ("C") send BCC, 
insert a semicolon ";" between each email address

example in range ("A2"): firstEmail@email.com;secondEmail@email.com;thirdEmail@email.com
for ranges in columns ("B") and ("C") it is the same situation



Miguel,
Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
30
December 4, 2020 - 10:36 am
sp_Permalink sp_Print

Really, thanks Miguel, appreciate your great help, also  thanks the Forum providing such lovely place to master Excel skills

Will try on that.

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
31
December 12, 2020 - 2:07 pm
sp_Permalink sp_Print

Miguel, further reqeust how to write a macro to join Emails address record from a Email Address Master[ per attached sample ] ie to join the "To" and "CC" email addresses and put ";" in between then place into the Email Macro A column for mass sending ?

Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
32
December 12, 2020 - 9:51 pm
sp_Permalink sp_Print

Hello everyone,

 

I attached a file with changes as requested

on the sheet I added a new command button to update the list of email addresses to (send to & send CC) 
with all the lists you had on the demo sheet, the demo sheet is in this file too

 

there are two command buttons, one to update the list and the other to send, you can adapt to your needs

 

Miguel,

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
33
December 12, 2020 - 10:27 pm
sp_Permalink sp_Print

Really thanks Miguel, will try on that.

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
34
December 12, 2020 - 10:35 pm
sp_Permalink sp_Print

I click on hte update button, but no effect ?

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
35
December 12, 2020 - 10:57 pm
sp_Permalink sp_Print

ie seems the update Macro Button not working?

Avatar
Miguel Santos
Member
Members
Level 0
Forum Posts: 80
Member Since:
February 20, 2020
sp_UserOfflineSmall Offline
36
December 13, 2020 - 5:20 pm
sp_Permalink sp_Print

Hello everyone,

the file I attached works perfectly, I just downloaded it on 2 different computers (32-Bit & 64-Bit), and I did the tests

review everything you are doing wrong

_ the first time you open an excel file (either because it is new or because the name has been changed), excel disables editing and macros, if you ignore these alerts, nothing will work

_ you must allow editing

_ you have to allow macros

_ in some situations (such as company computers), there may be additional security protocols, in which if the excel file was not created on that computer, the macros will always be in "disable" mode, "enable" mode not being allowed . To get around these protocols, you need to click on "save as", with a new name, close the excel file, and open the newly created one, allow editing and macros, and everything works

img4-1.JPGImage Enlarger

img3-1.JPGImage Enlarger
img2-1.JPGImage Enlarger
img1-2.JPGImage Enlarger

attached images, illustrative

 

 

(compressed) test video in file

 

Miguel,

sp_PlupAttachments Attachments
  • sp_PlupImage img4-1.JPG (37 KB)
  • sp_PlupImage img3-1.JPG (74 KB)
  • sp_PlupImage img2-1.JPG (32 KB)
  • sp_PlupImage img1-2.JPG (20 KB)
  • sp_PlupMedia Outlook-email-4.xlsm-Excel-2020-12-13-07-01-44-1.mp4 (3 MB)
Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
37
December 14, 2020 - 12:31 pm
sp_Permalink sp_Print

Will adjust the Macro security setting with my PC, but is the macro can work wih MsOffice 2010 version, I use Office 2010 to open the Macro file prompt some library files is missing

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
38
December 14, 2020 - 9:50 pm
sp_Permalink sp_Print

Hi Miguel, thanks the hints again.
So after adjust the Macro security level by the IT Administrator to my PC, now the Macro works with Ms.Office 2019 [Prof Version] wiht os Windows 10, but I did try an old office version, error crop-up prompting some Library files is missing, please help whcih library files must activate to enable Macro of this kind.

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
39
December 16, 2020 - 7:18 pm
sp_Permalink sp_Print

One more request how to add File Name in the Subject  Email body

 

for example  : Subject : AR Monthly report : 12349

Attachment : 12349.xls

 

for example  : Subject : AR Monthly report : 456789

Attachment : 456789.xls

The reason is easier to search from Outlook

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
40
December 17, 2020 - 3:31 pm
sp_Permalink sp_Print

In the Email Macro how to modify and include attachment File name in the Email Subject : 

 

(1) Monthly Report & 12349

attachment file is : 12349.xls

(2) Monthly Report & 456789

attachment file is : 456789.xls

 

(3) Monthly Report & 987654

attachment file is : 987654.xls

etc etc

Page: 123Jump to page
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Catalin Bombea, Riny van Eekelen, Zoe Chen
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 215
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Ngoc Qui Nguyen
Clement Mansfield
Rose .
Bindu Menon
Baruch Zemer
Forum Stats:
Groups: 3
Forums: 24
Topics: 6352
Posts: 27779

 

Member Stats:
Guest Posters: 49
Members: 32319
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.