Greetings! Macro Question (Emailing).

Madakushka

New Member
Joined
Mar 31, 2012
Messages
1
Hello All!

I have been searching these forums and my friend Google for any indication as to why I am having the issue at hand (user error most likely).

I have created a Macro to email a range of cells to a mailing list of my choosing. However when I email said range, which includes grouped rows that are collapsed, the recipients do not receive the email with those grouped rows collapsed. For some reason the email defaults the expanded view of the grouped rows (which is upwards of 300 rows) and is rough to view on a smart phone/etc.

The Macro I am using is the quick and easy one supplied from Microsoft's website. Thanks for reading and for any ideas as I am new to this!

ActiveSheet.Range("A2:O109").Select

ActiveWorkbook.EnvelopeVisible = True

With ActiveSheet.MailEnvelope
.Introduction = ""
.Item.to = "EmailAddress"
.Item.Subject = "Subject" & Time
.Item.Display
End With
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
This unhides all the collapsed rows before emailing.

Code:
    ActiveSheet.Range("A2:O109").Select
    [COLOR="Red"]Selection.EntireRow.Hidden = False[/COLOR]
    
    ActiveWorkbook.EnvelopeVisible = True
    
    With ActiveSheet.MailEnvelope
    .Introduction = ""
    .Item.to = "EmailAddress"
    .Item.Subject = "Subject" & Time
    .Item.Display
    End With
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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