Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Outlook 2007

Posted on 2011-03-03
9
Medium Priority
?
383 Views
Last Modified: 2012-06-21
Can I create a link for an incoming email to be added to the outlook calendar.  The date should be prompt from user.  If Yes, what are the steps. thank u.
My OS is windows 7.
0
Comment
Question by:jegajothy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35034189
Short answer yes ... it would require a macro if that is ok then do you want all incoming mails to be added or is there a filter as to which mails require a calendar entry?

Chris
0
 

Author Comment

by:jegajothy
ID: 35035865
in response to Chris.  I would prefer a macro that will be run from the message that has been selected.  This is because most of the time the senders are different and thus the format is not standard.  Thus, it would be ideal if the selected email can be added to the calendar.  thank u.
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35037238
A basic macro to what you require is as below.

To run as a rule you would call addCalItemfromRule whereas to run on the current selection use addCalItem NOTE it prioritises to use the first open item and if none found to use the selected item in the outlook folder window.

I have defaulted it be an all day appt set at 09:00 but hopefully you can see what to change but if not please ask

Chris
Sub addCalItemfromRule(mai As MailItem)
    addCalItem (mai)
End Sub

Sub addCalItem(Optional mai As MailItem)
Dim strDate As String
Dim calitem As Object

    If mai Is Nothing Then
        If TypeName(Application.ActiveWindow) = "Inspector" Then
            Set mai = Application.ActiveInspector.CurrentItem
        ElseIf TypeName(Application.ActiveWindow) = "Explorer" Then
            Set mai = Application.ActiveExplorer.Selection(1)
        Else
            Exit Sub
        End If
    End If

    strDate = InputBox("Please Enter the date for the Calendar entry ... or blank to skip", "Shortcut to Mail Item in Calendar")
    If strDate <> "" Then
        If IsDate(strDate) Then
            With Application.CreateItem(olAppointmentItem)
                .AllDayEvent = True
                .Start = DateValue(strDate) + TimeSerial(9, 0, 0)
                .ReminderMinutesBeforeStart = 15
                .ReminderSet = True
                .Subject = mai.Subject
                .Save
            End With
        End If
    End If
End Sub

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jegajothy
ID: 35041282
In response to Chris, u are a confirmed Guru, thank u.
How do I create a new macro and insertt your code.  When I click on macros, there is one macro which had pasted before, but the Create button is greyed out.
If I place the code in VB editor in a Module, but when I click on Macro, the procedure does not show.
Thank u again.
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 2000 total points
ID: 35041952
Modified to support calling from the run menu\\Chris.  Kept the same structure so simply add the new sub to the module\

Chris
Sub RunAddCalItem()
    addCalItem
End Sub

Open in new window

0
 

Author Closing Comment

by:jegajothy
ID: 35043315
Chris is a Super Guru - Bravo and well done.
0
 

Author Comment

by:jegajothy
ID: 35043322
To Chris,
I did a little of VB many moons ago, but can u please point me in the direction, where u learned to code for Outlook.  What version of Vb, etc. thank u
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35043441
can u please point me in the direction, where u learned to code for Outlook

1. Sue Moshers books: http://www.amazon.co.uk/Microsoft-Outlook-Programming-Administrators-Developers/dp/1555582869/ref=sr_1_6?s=books&ie=UTF8&qid=1299331429&sr=1-6 for 2003 as an example, also for 2007 she produced olk 2007 programming.  Haven't seen anything since from her, though I tend to think I have enough skill to muddle through in most cases.

2. Watching BDF's work here, http://www.experts-exchange.com/M_1311730.html

3. Simply having a go ... mistakes and all, I learned a long time ago there is nothing with getting it wrong and I can be sure here that David, (BDF) will help out when I am wrong ... note when not if!

4. Glad to help

Chris
0
 

Author Comment

by:jegajothy
ID: 35046276
In response to Chris, thank u, but the price looks steep for me at the time being.  Hopefully it will come down in a month or so.  I did vb way back in 2001 so looks like the vb itch is still within me. Thank u for the information.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question