Ok, I have got it to work, with this code:
Option Compare Database
Public mobjOLA As Outlook.Application
Public mobjNS As Outlook.NameSpace
Public mobjFLDR As Outlook.MAPIFolder
Public mobjAPPT As Outlook.AppointmentItem
Public i As Integer
Public Sub DeleteAppts()
strFindAppt =...
I get 'Runtime 91' Variable or Block variable not set on:
mobjAPPT = mobjFLDR.Items.Item(i) 'this will give you the 1st, 2nd etc appointment item
With or without the -1
So this is the code:
Public Sub DeleteAppt()
strFindAppt = strFindAppt
' Use this method ONLY if the subject of the
' Appointment Item is known and is UNIQUE.
strFindAppt = "*"
Set mobjOLA = CreateObject("Outlook.Application")
Set mobjNS =...
For the advanced search one, I could only add bookings that are from 1 week ago, which at the mo is:
36 at the moment (Its only 3 cottages and past bookings can be removed) So this was 29th June onwards, this can be done in a simple query.
So I just need a code that will delete all the...
Yes but I don't understand it. I have only just got in to VBA and this outlook objects is mind blowing. I just wanted to find a simple solution. I could send days and days on this working it out, but I don't think I would get anywhere.
I just need a finished working code, so that as I develop...
Hi, I have posted about this before, but never got anywhere, and seen as I have a bit of time off again, I am back to try again.
I am wanting to find and delete all Appointments with a * or any other character. This is so I can then add them again using VBA code from my database.
So I have...
That seems fine. I see where you are going. I to no nothing about outlook objects, so...
I will have to look around for that code. Or if any one on here knows of it?
Sorry I took so long to reply, been a bit busy.
So looking at that, there is the 'InStr' and 'LIKE'
I need to apply it to a variable I think, as it is used here like this,
Set mobjAPPT = mobjFLDR.Items(strFindAppt)
So how could I make this line search of 'Containing' and not 'Match'?
I want to delete all appointments in my calendar with * in the subject. This code (Just a small bit of it) deletes the subjects when strFindAppt = Subject, but I need to find appointments with * in them, not * as the subject without anything else.
strFindAppt = strFindAppt
' Use this...
Hi,
I have built a form that needs some VBA filters to search for booking, but it won't allow filters now. I have checked the data settings and everwhere I could think of to allow filters, with no luck. It will allow filters at startup, but won't allow them to be changed.
Here is link to...
Hi, I am looking to use this code to generate a KML file containing address of all our customers that visit are cottages. So I want a really simple code that will generate the KML file. I will then change the recordset to match what information I want to pass thought the VBA code and in to the...
You can put filters on form load, if your in Office 2007 (Don't no about 2003) go to 'Data' tab and you will see 'Filter on form load' = TRUE and Filter = fieldname = FALSE ? Something like that