Insert visible cell range into Outlook reminder

CWBlack

New Member
Joined
Sep 30, 2014
Messages
21
I am trying to create a reminder with the visible cells in a range in the body of the reminder. I have been able to create teh reminder with text and single cell contents, but not a range. Here is what I have right now. Thanks in advance.

Code:
Sub Removal_Reminder()


    Dim appOL As Object
    Dim objReminder As Object
    Dim rng As Range


    Set rng = Application.Intersect(ActiveSheet.UsedRange, Range("C4:G100"))
    rng.SpecialCells(xlCellTypeVisible).Select
    
    Set appOL = GetObject(, "Outlook.application")
    Set objReminder = appOL.CreateItem(1) ' olAppointmentItem
     
    objReminder.Start = Worksheets("Reminder").Range("a1") ' 4/Feb/2004 18:30
    objReminder.Duration = Worksheets("Reminder").Range("b1") ' 30
    objReminder.Subject = Worksheets("Reminder").Range("c1") ' subject text
    objReminder.body = rng
    objReminder.ReminderSet = True
    objReminder.Save
End Sub
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi,,

I think you have to convert the range to text to enter into the body.
There may be much cleaner or easier ways to do this but this should get you started.

Code:
    Dim strtable As String


........
........
rng.SpecialCells(xlCellTypeVisible).Select - not needed

    FirstRow = 4
    LastRow = 100
    FirstCol = 3 'C
    LastCol = 7 ' G

For r = FirstRow To LastRow
For c = FirstCol To LastCol
For Each cell In Cells(r, c)
strtable = strtable & "  " & cell.Value
Next
Next
strtable = strtable & vbNewLine
Next


Set appOL = GetObject(, "Outlook.application")
......etc
objReminder.body = strtable
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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