有没有一种方法可以创建'约会' [英] Is there a way of progromatically creating 'Appointment

查看:99
本文介绍了有没有一种方法可以创建'约会'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

有没有办法以编程方式创建"此项目中的约会 - 用户定义的字段"Outlook用户定义属性的动态集合。

Is there a way of programmatically creating 'Appointment - User Defined Fields In This Item' Dynamic collection of Outlook User Defined Properties.

到目前为止,似乎需要预定义字段。

So far, it would appear that the fields need to be predefined.

我的原始发现是否正确?

Are my original findings correct?

非常感谢

斯图尔特

推荐答案

Hello Stewart,

Hello Stewart,

展望对象模型提供了一种处理用户定义字段的方法。

The Outlook object model provides a single way for dealing with user defined fields.

您可以通过调用  UserProperties.Add   Outlook项目或文件夹的方法,或 UserDefinedProperties.Add   我thod
是一个文件夹。

You can define custom properties by calling either the UserProperties.Add method for an Outlook item or folder, or theUserDefinedProperties.Add method for a folder.

你可以创建一个由  OlUserPropertyType   枚举,
除了以下类型:  olEnumeration   olOutlookInternal
  olSmartFrom

You can create a property of a type that is defined by the OlUserPropertyType enumeration, except for the following types: olEnumeration, olOutlookInternal, and olSmartFrom.

第一次设置属性由  UserProperties.Add   方法创建d,使用  UserProperty.Value   属性
而不是  SetProperties     SetProperty   方法  PropertyAccessor   对象。

To set for the first time a property created by the UserProperties.Add method, use the UserProperty.Value property instead of the SetProperties and SetProperty methods of the PropertyAccessor object.

例如,下面列出了一个VBA示例代码:

For example, a VBA sample code is listed below:

Sub AddUserProperty() 
 Dim myItem As Outlook.ContactItem 
 Dim myUserProperty As Outlook.UserProperty 
 
 Set myItem = Application.CreateItem(olContactItem) 
 Set myUserProperty = myItem.UserProperties _ 
 .Add("Details", olText) 
 myUserProperty.Value = "Neighbor" 
 myItem.Display 
End Sub


这篇关于有没有一种方法可以创建'约会'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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