Setting Calendar View to Day/Week or Month

Status
Not open for further replies.

paulct

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
I've been searching for an answer but cannot find it. I have a macro which fires whenever an appointment is added to the calendar.

It scans the subject, location and body fields and looks for a number of strings in an array.

If it finds a match it adds an all day appointment to the calendar on the correct date, with the string as the subject.

My problem is I am using "olkView.GoToDate olkAppt.Start" to goto the correct date but if the user has the calendar set to Week view then the appointment is always created on the Monday.

How do I switch the calendar to Day view so when I then execute the goto date code and get the right day/date. I then need to switch the calendar back to the original view.

Thanks!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Is there a reason you need to go to date and can't just get the date from the appointment that triggers the macro?

See View Object (Outlook) for some samples - i think this works in 2007, but i could be wrong. If it's not in the object model, then its new to outlook 2010.
 

paulct

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Thanks Diane - I was using a generic "CreateAppointment" routine which I have now adapted thanks to your suggestion.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P OWA Settings->Calendar->Events from Email; Setting changes do not hold Using Outlook 1
M Where is the setting to *turn off* open calendar in a new window? Using Outlook 3
B Outlook Calendar/setting appointments Using Outlook 1
Horsepower Setting appointments in calendar Using Outlook 3
T Setting Color codes for each user of a shared Calendar Using Outlook 1
V Setting up windows 7 & outlook 2007 w/ Iphone 4 & synch contacts & calendar Using Outlook 9
A Setting Emails to be send in calendar holidays to group of people Using Outlook 6
B Setting Default calendar - using exchange mailbox and a .pst Using Outlook 2
U Outlook 2010 - Mail: setting to show email address with sender name? Calendar: decline attendance w/ Using Outlook 2
Marc2019 Setting up an Outlook Account on Mac Os 10.6.8 Outlook 2011 Using Outlook 1
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2
llama_thumper Setting up forwarders on Exchange server Exchange Server Administration 0
B Setting rules Using Outlook 1
C iCloud Setting missing Outlook tab and Outlook missing the iCloud refresh button Using Outlook 4
B Setting defaults Using Outlook 2
C need help setting up outlook first time Using Outlook 1
P Reading Pane (Reading Pain?) Default Setting Using Outlook 1
W Setting up a custom form Outlook VBA and Custom Forms 2
mctabish Setting "Reply To" based on inbox Outlook VBA and Custom Forms 2
R Setting font and color used when replying to an email Outlook VBA and Custom Forms 3
M Setting flag follow up for next business day Outlook VBA and Custom Forms 1
Ed Sheehan Unusual behaviour in setting Sender (Outlook 2016) Outlook VBA and Custom Forms 4
Jennifer Murphy Equations don't comply with style setting to left justify Using Outlook 0
J Setting default address book Using Outlook 0
N Does a Shared Folder Policy override a Digital Signature Setting for macros? Outlook VBA and Custom Forms 6
Diane Poremsky Setting up an Outlook.com IMAP account New Slipstick.com Articles 0
Diane Poremsky Setting the default Country for Outlook Contacts New Slipstick.com Articles 0
H Need help setting up GetFolderPath-Makro with Vodafone IMAP Mail-Account Outlook VBA and Custom Forms 0
Diane Poremsky Adjusting Outlook's Zoom setting in Email New Slipstick.com Articles 0
O Setting default format for composing/replying to emails Using Outlook 3
Diane Poremsky Adjusting Outlook's Zoom setting in Email New Slipstick.com Articles 0
Diane Poremsky Setting Custom Reminder Times New Slipstick.com Articles 0
A Can't stop Outlook.com from setting reminders on appointments? Using Outlook.com accounts in Outlook 3
A Setting RULES with more than one condition in MS OUTLOOK Using Outlook 6
L Setting up my PA's Outlook Using Outlook 7
E Need Help on Setting up a repeated Reminder on Task with Reoccurence Every Year Using Outlook 6
N "Instant Search" setting a default view Using Outlook 3
H SETTING UP A "NEW" NEVER HAD NEVER USED EMAIL ACCOUNT Using Outlook 9
K Setting Default Email Address for Meeting Replies Using Outlook 3
S Setting up Outlook 2010 to work with custom domain outlook.com account BCM (Business Contact Manager) 3
D Setting defult "Show a room list" Using Outlook 0
J Setting tabs in contacts / notes field Using Outlook 0
T Setting a Default Subject from a certain Signature Using Outlook 0
K Help Needed - setting up Email in Outlook 2013 Using Outlook 3
mikecox setting Default area code in Contacts Using Outlook 5
G Outlook2013 - "From" name doesn't change even when changed in Account Setting Using Outlook 4
D How do I start completely from scratch in setting up Outlook 2013? Using Outlook 6
V View zoom setting changing Using Outlook 1
C Setting up Outlook 10 on Widows 8 using Google Server Using Outlook 3
I Outlook Appointments - Setting default text in message body Using Outlook 3

Similar threads

Top