473,763 Members | 7,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set appointment in Outlook on other computer

I am using the code provided by MSDN to set an appointment on my
Outlook. However, I would like to adjust this code so that instead of
setting the appointment on in Outlook on my computer, it places it in
Outlook on a different computer on the network. Here is the code
sample from MSDN; any suggestions on how I might accomplish my goal?

Private Sub cmdAddAppt_Clic k()
On Error GoTo Add_Err

'Save record first to be sure required fields are filled.
DoCmd.RunComman d acCmdSaveRecord

'Exit the procedure if appointment has been added to Outlook.
If Me!AddedToOutlo ok = True Then
MsgBox "This appointment is already added to Microsoft Outlook"
Exit Sub
'Add a new appointment.
Else
Dim objOutlook As Outlook.Applica tion
Dim objAppt As Outlook.Appoint mentItem
Dim objRecurPattern As Outlook.Recurre ncePattern

Set objOutlook = CreateObject("O utlook.Applicat ion")
Set objAppt = objOutlook.Crea teItem(olAppoin tmentItem)

With objAppt
.Start = Me!ApptDate & " " & Me!ApptTime
.Duration = Me!ApptLength
.Subject = Me!Appt

If Not IsNull(Me!ApptN otes) Then .Body = Me!ApptNotes
If Not IsNull(Me!ApptL ocation) Then .Location =
Me!ApptLocation
If Me!ApptReminder Then
.ReminderMinute sBeforeStart = Me!ReminderMinu tes
.ReminderSet = True
End If

Set objRecurPattern = .GetRecurrenceP attern

With objRecurPattern
.RecurrenceType = olRecursWeekly
.Interval = 1
'Once per week
.PatternStartDa te = #7/9/2003#
'You could get these values
'from new text boxes on the form.
.PatternEndDate = #7/23/2003#
End With

.Save
.Close (olSave)
End With
'Release the AppointmentItem object variable.
Set objAppt = Nothing
End If

'Release the Outlook object variable.
Set objOutlook = Nothing

'Set the AddedToOutlook flag, save the record, display a message.
Me!AddedToOutlo ok = True
DoCmd.RunComman d acCmdSaveRecord
MsgBox "Appointmen t Added!"

Exit Sub

Add_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
Thanks,
Jody Blau

Mar 5 '06 #1
1 2518
On 5 Mar 2006 14:16:25 -0800, "jodyblau" <jo******@gmail .com> wrote:

Without reading all of your code: yes, this is possible. The receiver
will have to grant the setter rights to do this (by granting these
rights in the Calendar folder). In our company we have such code, and
we give the others Authors rights.

-Tom.

I am using the code provided by MSDN to set an appointment on my
Outlook. However, I would like to adjust this code so that instead of
setting the appointment on in Outlook on my computer, it places it in
Outlook on a different computer on the network. Here is the code
sample from MSDN; any suggestions on how I might accomplish my goal?

Private Sub cmdAddAppt_Clic k()
On Error GoTo Add_Err

'Save record first to be sure required fields are filled.
DoCmd.RunComman d acCmdSaveRecord

'Exit the procedure if appointment has been added to Outlook.
If Me!AddedToOutlo ok = True Then
MsgBox "This appointment is already added to Microsoft Outlook"
Exit Sub
'Add a new appointment.
Else
Dim objOutlook As Outlook.Applica tion
Dim objAppt As Outlook.Appoint mentItem
Dim objRecurPattern As Outlook.Recurre ncePattern

Set objOutlook = CreateObject("O utlook.Applicat ion")
Set objAppt = objOutlook.Crea teItem(olAppoin tmentItem)

With objAppt
.Start = Me!ApptDate & " " & Me!ApptTime
.Duration = Me!ApptLength
.Subject = Me!Appt

If Not IsNull(Me!ApptN otes) Then .Body = Me!ApptNotes
If Not IsNull(Me!ApptL ocation) Then .Location =
Me!ApptLocatio n
If Me!ApptReminder Then
.ReminderMinute sBeforeStart = Me!ReminderMinu tes
.ReminderSet = True
End If

Set objRecurPattern = .GetRecurrenceP attern

With objRecurPattern
.RecurrenceType = olRecursWeekly
.Interval = 1
'Once per week
.PatternStartDa te = #7/9/2003#
'You could get these values
'from new text boxes on the form.
.PatternEndDate = #7/23/2003#
End With

.Save
.Close (olSave)
End With
'Release the AppointmentItem object variable.
Set objAppt = Nothing
End If

'Release the Outlook object variable.
Set objOutlook = Nothing

'Set the AddedToOutlook flag, save the record, display a message.
Me!AddedToOutlo ok = True
DoCmd.RunComman d acCmdSaveRecord
MsgBox "Appointmen t Added!"

Exit Sub

Add_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
Thanks,
Jody Blau


Mar 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4012
by: Matt Moran | last post by:
I need/want to be able to send an email from a website running IIS and CDONTS for mail (or ASPMAIL) that comes into the inbox as an appointment to be accepted. The company is not running Exchange internally or on the website (which is hosted). Here is the basic app: A visitor schedules an appointment to speak to a rep from the company. Their appointment data is kept in a SQL DB.
0
9100
by: Akira | last post by:
Could someone tell me how to send outlook appointment email from asp page? I would like appointment email just like one outlook can send out. I tried to look for an answer for this, but it seems exchange server has to be installed on web server if I want to use the following code?? Is there way to send outlook appointment email without using outlook.Application object? If not, how can I make the code below work since we have separate...
3
7519
by: Sam | last post by:
My db looks after the hiring and lending of equipment, the form which books out equipment hired prints a signout sheet and automatically inserts an appointment into outlook advising the operator on the due date that a particular hire is due. I have used microsoft's automated appointment code to do this, what I would also like the code to do is to email an appointment to the person hiring the gear. Knowing that you can email an...
2
6359
by: Kamyk | last post by:
Hello all! I have created a function in VB which generate appointment in Outlook. Everything is OK, except one thing. I cannot send it automatically using a button in Access, because I don`t know what is the code to send it automatically. I noticed that if I click on Calendar>"click on selected appointment">menu>Appointment>Invite Atendees everything is going well and this appointment is sent to attendees given on the list. My question...
1
4314
by: mal_lori | last post by:
Hello, I have basic code to Creat an Outlook appointment and add Access Data. (code below) This works to add appointments to the basic calendar in my user folder. However I wish to add it to a Calendar that resides in Public folder. Any advice or resources on how to do this? The "address" is .... Public Folders...All Public Folders...CommonRanchCalendar
0
2859
by: saurabhaggarwal | last post by:
Hi Suppose there is backend that stores all the appointments that are currently there in outlook. The job of my plugin is to add all the appointments that are there in outlook back to the database and if there is any appointment in database but not in outlook then plugin adds that appointment to the outlook.
2
10105
by: Ori :) | last post by:
I am writing an application to retrieve appointments from Outlook, I have the appointment items sorted by "Start" field and now I want to find the first record which's "Start" value is later than now (future appointment The relevant piece of my current code Dim oCalendar As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar Dim oItems As Outlook.Items = oCalendar.Item oItems.Sort("Start"...
2
3672
by: Kosmos | last post by:
Alright so I've got this Outlook code written in VBA in Access. The first part, which works, records information about appointment times based on the required days before notification of certain contracts and then it adds them to the outlook calendar of the current user. This code works and is nested within a bunch of if statements because it only needs to trap certain appointments. The table I create with this code is later used to attempt to...
1
1786
truthlover
by: truthlover | last post by:
Hi All, Can anyone help me to generate an Outlook 2003 Appointment that can be generated from an Access 2000 form? I have looked at some of the previous posts on this subject (both on TheScripts as well as other sources) but because my understanding of vba is so limited, I havent been able to make much sense of them. If anyone has the grace and patience to put it on a lower shelf for me, I'd be greatly appreciative (I promise, I will...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.