Send current Excel workbook as Attachment Macro

Vbalearner85

Board Regular
Joined
Jun 9, 2019
Messages
139
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have below Macro which I am using to send current excel workbook as attachment from gmail via outlook.

Macro is working as expected with the issue of not attaching the file ( as the file is more than 100 mb and would be sent as Google drive link)

Any help would be appreciated as to how to send large file


Sub SendWorkBook()
'Update 20131209
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
On Error Resume Next
With OutlookMail
.To = "skyyang@extendoffice.com"
.CC = ""
.BCC = ""
.Subject = "kte feature"
.Body = "Hello, please check and read this document, thank you."
.Attachments.Add Application.ActiveWorkbook.FullName
.Send
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

I think the only way you are going to be able to do this is to split the file over 4 emails - Gmail will only allow attachments up to 25mb in total.

Another option would be to compress the file but I'm not sure how big the file would still be.
 
Upvote 0
If I directly attach the file in gmail..it does upload in GoogleDrive and send send mail as attachment(which is google link) :)..but macro does not do that..just thinking..what needs to be modified
 
Upvote 0
I understand but what you are asking Excel to do is open GoogleDrive save the document to it and then copy a 'share with' link to include in the email - Sorry but I don't believe you are going to get a macro to do that :(
 
Upvote 0
Ok so you might be able to do the save part of this with the google API :), not got time to look at the moment though
 
Upvote 0
You can send it manually via:
WeTransfer.com
Allows up to 2GB.
 
Upvote 0
I finally managed to find a round about and have used Google sync folder on my system to backup only particular folder,,where this file is saved everyday..
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top