?
Solved

How to fix  "Cannot save free/busy information"

Posted on 2010-08-27
4
Medium Priority
?
1,053 Views
Last Modified: 2012-05-10
Hi Experts,

I need Experts help. The attached script shows "Cannot save free/busy information" when I run the script. I'm using this script for sending email with Calendar.

Experts has advised me to use cleanfreebusy switch, but the problem is I have no idea how to do this. Hope Experts can help me. Attached the script together with my workbook.
Sub SendEmail2()
Dim olkApp As Object
Dim MItem As Object
Dim olkAppointment As Object
  
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Adate As Date
Dim Atime As String
Dim Msg As String
Dim Msg2 As String
Dim SendStatus As String
Dim FileLocation As String
Dim strApptBody As String

Const olAppointmentItem As Integer = 1
Const olBusy As Integer = 2
Const olICal As Integer = 8
Const olMailItem As Integer = 0
      
  'Loop through the rows
  For Each cell In Columns("H").Cells.SpecialCells(xlCellTypeConstants)
    If cell.Value Like "*@*" Then
    
      'Get the data
      SendStatus = cell.Offset(0, 1)
      If SendStatus <> "To be sent" Then GoTo NotThisOne
      Subj = cell.Offset(0, -1).Value
      EmailAddr = cell.Value
      Adate = cell.Offset(0, -6).Value
      Atime = cell.Offset(0, -5).Value
      FileLocation = "C:\ApptFiles\OutlookAppointment.ics"
'FileLocation = Environ("temp") & "\" & "OutlookAppointment.ics"
    cell.Offset(0, 1).Value = "Sent"
   
    Set olkApp = CreateObject("outlook.application")
    Set olkAppointment = olkApp.CreateItem(olAppointmentItem)
    Msg2 = "New Task"
    
    With olkAppointment
        .Start = Adate
        .End = .Start + TimeValue("00:30:00")
        .Subject = Msg2
        .Location = " "
        .Body = Msg
        '.BusyStatus = olBusy
        .ReminderMinutesBeforeStart = 2880
        .ReminderSet = True
        '.Display
        
        'Save the iCalendar file in a known folder
        .SaveAs FileLocation, olICal
        
        'Use Close to retain the new appointment within the Outlook Calendar, or Delete to delete it.
        'Both options keep the just-created .ics file
        
        '.Close False
        .Delete
    
    End With

      Set MItem = olkApp.CreateItem(olMailItem)
      With MItem
        .To = EmailAddr
        .Subject = Subj
        .Body = Msg
        .Attachments.Add (FileLocation)
        .Send
        '.Save 'to Drafts folder
      End With
      strApptBody = strApptBody & "Item: " & Format(cell.Offset(0, -6).Value + cell.Offset(0, -5).Value, "dd mmm yyyy hh:mm") & " | " & cell.Offset(0, -1).Value & vbCrLf
NotThisOne:
    End If
  Next
  If strApptBody <> "" Then
        With olkApp.CreateItem(olAppointmentItem)
            .Start = DateAdd("d", 7, Now())
            .End = .Start + TimeValue("00:30:00")
            .Subject = "Event Record"
            .Location = " "
            .Body = strApptBody
            '.BusyStatus = olBusy
            .ReminderMinutesBeforeStart = 2880
            .ReminderSet = True
            .Save
            .Close False
    End With
  End If
  Set olkApp = Nothing
  Set olkAppointment = Nothing
  Set olkApp = Nothing

End Sub

Open in new window

EventList-2-.xls
0
Comment
Question by:Theva
[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
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
calacuccia earned 2000 total points
ID: 33548939
There are many possible causes of this error, it seems.

To do what was suggested (cleanbusyfree), you have to do this

Close Outlook
Click on your Start button (leftbottom)
Select "Run ..."
Type this command in the text box:
outlook.exe /cleanfreebusy
Click OK.

If after this, you still have your issue, you might have to go through stuff like the links below.

Take a look here:

http://support.microsoft.com/kb/958443
http://technet.microsoft.com/en-us/library/bb397225(EXCHG.80).aspx
0
 

Author Comment

by:Theva
ID: 33549344
Hi,

When I run this code, it shows "cannot clean your local cleanfreebusy information. How to fix this? please advice.
0
 
LVL 17

Assisted Solution

by:calacuccia
calacuccia earned 2000 total points
ID: 33549502
As said above, then you have to go through these:


http://support.microsoft.com/kb/958443
http://technet.microsoft.com/en-us/library/bb397225(EXCHG.80).aspx

But I'm afraid it's gonna be a tricky thing to solve.
0
 

Author Closing Comment

by:Theva
ID: 33648228
Hi,

Thanks for the guide.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

770 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