Alan's Blog

"Yeah. I wrote a script that will do that."

Outlook VBA: Reply to All as Text

Posted on May 24th, 2011

I am a messaging old-timer, going back to the days of PINE and ELM and RBBSMail.  I like to reply to message like this:

>You said
I reply.

Actually the old days the mail client did it by initials so it looked like this:

YS>You said
AK>I reply.

I get a lot of HTML mail, which I see a a waste of storage. I reply as text with the the following code:

Sub ReplyAsText()
    Dim rply As Outlook.MailItem
    Dim item As Outlook.MailItem
    Dim retval As Integer
   
    Set item = GetCurrentItem()
    item.BodyFormat = olFormatPlain
   
    retval = MsgBox("Reply to all as text? No is just sender.", _
    vbYesNoCancel + vbQuestion + vbSystemModal, _
    "Reply to All?")
   
    If retval = vbCancel Then Exit Sub
   
    If retval = vbYes Then
        Set rply = item.ReplyAll
    Else
        Set rply = item.Reply
    End If
   
    rply.Display

    item.Close olDiscard

    Set rply = Nothing
    Set item = Nothing
End Sub
									

Tags: ,
Filed under Computing | No Comments »

Outlook VBA: Snooze until one minute prior to start

Posted on May 24th, 2011

I spend a lot of time on the phone for conference calls.  If I snooze until 5 minutes before I am too early.  0 minutes before and I am too late.  The following is VBA code to snooze open reminders until one minute prior to starting.  I put it into a module and mapped it to a button.

Sub SnoozeUntilOneMinute()
‘Delays all visible reminder until one minute before start

    Dim olApp As Outlook.Application
    Dim objRems As Outlook.Reminders
    Dim objRem As Outlook.Reminder
    Dim varTime As Variant

    Set olApp = New Outlook.Application
    Set objRems = olApp.Reminders
 
    For Each objRem In objRems
        If objRem.IsVisible = True Then
            varTime = DateDiff(“n”, Now(), objRem.item.Start) – 1
            objRem.Snooze (varTime)
            MsgBox “Snoozed ” & objRem.item.Subject & ” for ” & CStr(varTime) & ” minutes.”, vbApplicationModal + vbOKOnly + vbInformation, “Snooze”
        End If
    Next objRem

End Sub

Tags: ,
Filed under Computing | No Comments »

Please Note

All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with Version 3 or 4.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.

Site Search

Categories

Archives

SQL Site

Bad Behavior has blocked 169 access attempts in the last 7 days.