A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

UserProperties for New Items



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 18th 06, 06:23 PM posted to microsoft.public.outlook.program_vba
dch3
external usenet poster
 
Posts: 105
Default UserProperties for New Items

I'm trying to assign a name to a new user property, however VBA is saying
that the property is read-only. Help?

Dim objUserProperty As Outlook.UserProperty

Set objUserProperty = objAppointmentItem.UserProperties
objUserProperty.Name = "Job Number"
objUserProperty.Type = olText
objUserProperty.Value = Worksheets("upload").Range("B" & intRow).Value

(...there's nothing like IT rebuilding your laptop and not mentioning that
not all of the folders on the laptop will be backuped first)
Ads
  #2  
Old December 18th 06, 06:35 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default UserProperties for New Items

Did you forget ".Add"?

Set objUserProperty = objAppointmentItem.UserProperties.Add("Job Number",
olText)
objUserProperty.Value = Worksheets("upload").Range("B" & intRow).Value

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dch3" wrote in message
...
I'm trying to assign a name to a new user property, however VBA is saying
that the property is read-only. Help?

Dim objUserProperty As Outlook.UserProperty

Set objUserProperty = objAppointmentItem.UserProperties
objUserProperty.Name = "Job Number"
objUserProperty.Type = olText
objUserProperty.Value = Worksheets("upload").Range("B" & intRow).Value

(...there's nothing like IT rebuilding your laptop and not mentioning that
not all of the folders on the laptop will be backuped first)



  #3  
Old December 18th 06, 06:46 PM posted to microsoft.public.outlook.program_vba
dch3
external usenet poster
 
Posts: 105
Default UserProperties for New Items

Thats it. I played with this a month or two ago for the first time and the
code that I wrote was deleted when the laptop was rebuilt.

"Dmitry Streblechenko" wrote:

Did you forget ".Add"?

Set objUserProperty = objAppointmentItem.UserProperties.Add("Job Number",
olText)
objUserProperty.Value = Worksheets("upload").Range("B" & intRow).Value

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dch3" wrote in message
...
I'm trying to assign a name to a new user property, however VBA is saying
that the property is read-only. Help?

Dim objUserProperty As Outlook.UserProperty

Set objUserProperty = objAppointmentItem.UserProperties
objUserProperty.Name = "Job Number"
objUserProperty.Type = olText
objUserProperty.Value = Worksheets("upload").Range("B" & intRow).Value

(...there's nothing like IT rebuilding your laptop and not mentioning that
not all of the folders on the laptop will be backuped first)




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UserProperties Date/Time format Bill Outlook - Using Forms 3 September 22nd 06 05:23 PM
Keep changed UserProperties when moving to different folder Stefan Singer Outlook - Using Forms 5 June 13th 06 12:25 PM
UserProperties and Combo-type controls Simon Woods Outlook and VBA 4 April 19th 06 06:07 PM
VB.net Cannot add userproperties Ben Add-ins for Outlook 2 February 24th 06 10:32 AM
Userproperties in Folder MClaudio Outlook and VBA 3 January 16th 06 07:59 AM


All times are GMT +1. The time now is 06:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.