从Excel发送Outlook约会请求的帮助 [英] Help With Sending an Outlook Appointment Request from Excel

查看:115
本文介绍了从Excel发送Outlook约会请求的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我生命中,我似乎无法使这段代码正常工作,

我正在尝试将Excel中的Outlook约会发送到MS Outlook中的公共日历

任何帮助将不胜感激.

日历名称是:ASF DG日历-Calendrier DG ASF

For the life of me, I can't seem to get this code to work,

I am trying to send an outlook appointment from Excel to a Public Calender in MS Outlook

Any help is greatly appreciated.

Calender Name is: ASF DG Calendar - Calendrier DG ASF

Sub CreateCalEntry()

Dim objfolder As Object
Dim objOutlook As Object
Dim objAppt As Object
Dim mynamespace

Set objOutlook = CreateObject("Outlook.Application")
Set mynamespace = objOutlook.GetNamespace("MAPI")
Set objfolder = mynamespace.Folders("Public Folders\All Public Folders\Regional Folders %2F Répertoires Régionaux\NCR %2F RCN\Safety and Security %2F Sécurité et Sûreté\Road Safety %2F Sécurité Routière\* All (ASF) %2F Tout (ASF)")

MsgBox mynamespace

Set objAppt = objfolder.Items.Add(olAppointmentItem)

With objAppt
.Start = Now()
.Subject = "test the subject"
.Body = "Test the body"
.Location = "this is the location"
.ReminderMinutesBeforeStart = 30
.ReminderSet = True
.Display
'.Close (olSave)

End With

Set objAppt = Nothing

End Sub

推荐答案

在VBA或Excel开发人员论坛中发布您的问题

Post your question in VBA or Excel developer forum

VBA: http://social.msdn.microsoft.com/forums/zh-CN/isvvba/threads/

VBA : http://social.msdn.microsoft.com/forums/en-US/isvvba/threads/

Excel: http://social.msdn.microsoft.com/Forums/zh-CN/exceldev/threads

Excel : http://social.msdn.microsoft.com/Forums/en-US/exceldev/threads

kaymaf


这篇关于从Excel发送Outlook约会请求的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆