Object doesn't support this property

Novice1

Registered User.
Local time
Today, 10:35
Joined
Mar 9, 2004
Messages
385
The following code works fine until I try to update the Remarks field when I get the following error: "Object doesn't support this property." Not sure what I'm doing wrong.


Dim OLApp As Outlook.Application
Dim OLMsg As Outlook.MailItem
Set OLApp = New Outlook.Application
Set OLMsg = OLApp.CreateItem(olMailItem)

With OLMsg
.Display
.To = [SubjectEMail]
.CC = [CCF_EMail] & "; " & [CC_Email]
.Subject = "Initial Assignment Notification"
.ReadReceiptRequested = True
.Body = [Grade] & " " & [Last Name] & ", " & vbCr & vbCr & "1. blah, blah, blah"

.Attachments.Add "C:\Users\Public\Documents\AssignIP.pdf"


Me.Remarks = Format(Date, "dd mmm yy") & ": Initial assignment notification requirements were sent to member on this date"

End With
 
What is the object represented by Me? Probably it does not expose a public member named Remarks, or that member cannot be assigned a value. Something along those lines.

As an aside, since it does not use the object in the With block, I would move it below the End With.
 
Did you rename the remarks field?
 
Thanks ... no luck.

I think it has something to do with tab controls. Works fine on a straight form but not a tabbed form. Do I need to reference the tab on the form when referring to the field?
 

Users who are viewing this thread

Back
Top Bottom