Solved

Outlook VBA macro - Set appointment item to "show time as tentative"

Posted on 2010-08-20
3
1,991 Views
Last Modified: 2013-12-19
Help please -
I need an Outlook (2007) VBA macro - Set appointment item to "show time as tentative"
When I am in the "explorer view " of my calendar I would like to click a macro whih will set the selected item(s) to "tentative"

Thanks!
Jim
0
Comment
Question by:JWK801
[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
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
SylvainDrapeau earned 500 total points
ID: 33490352
Hello !

Assign "MakeTentative" to a new button and test if this does the trick.

I did not test it but I'm pretty sure it will work. Just for caution, create a new calendar and test there before testing in your real calendar.

If it does not work, write back with the error and line number.

I can only test it on Monday, if you don't mind waiting.

Syldra
Sub MakeTentative()

Dim objItem As Object

Set objItem = GetCurrentItem()

If Not TypeOf objItem Is AppointmentItem Then
    MsgBox ("Not an appointment")
    Exit Sub
End If

Set objItem.BusyStatus = 1
objItem.Save

End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
    Case "Explorer"
        Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
    Case "Inspector"
        Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
    Case Else
End Select
End Function

Open in new window

0
 

Author Closing Comment

by:JWK801
ID: 33491439
I did not test the code. But you gave me the answer I needed.

Thanks!
0
 
LVL 8

Expert Comment

by:SylvainDrapeau
ID: 33491490
Great, thank you !

If there's an error with the code, I can still help you. It would be better to have a 100% working solution in case someone with no VBA knowledge needs it later.

Syldra
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

635 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