Drewgarry007
Board Regular
- Joined
- Oct 1, 2011
- Messages
- 142
Hi,
I have upgraded my PC to windows 365 and now get a 'Object library feature not supported' error when running the below macro. I have edited the email addresses, texts and file paths. the files the macro picks up are created and saved daily so these would be the first files saved down using windows 365:
Any ideas??
I have upgraded my PC to windows 365 and now get a 'Object library feature not supported' error when running the below macro. I have edited the email addresses, texts and file paths. the files the macro picks up are created and saved daily so these would be the first files saved down using windows 365:
Code:
Public Sub CreateNewMessage()
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.To = "Email addressl"
.CC = "Email address"
'.BCC =
.Subject = "Super " & Format(Now, " ddmmmyy")
.Categories = "Test"
.VotingOptions = "Yes;No;Maybe;"
.BodyFormat = olFormatPlain ' send plain text message
.Importance = olImportanceHigh
.Sensitivity = olConfidential
.Attachments.Add ("Z:\file path" & Format(Now, " ddmmmyyyy") & ".xlsx")
.Attachments.Add ("Z:\file path" & Format(Now, " ddmmmyyyy") & ".xlsx")
' Calculate a date using DateAdd or enter an explicit date
.ExpiryTime = DateAdd("m", 6, Now) '6 months from now
.DeferredDeliveryTime = #8/1/2012 6:00:00 PM#
.Body = "Hi," & vbNewLine & vbNewLine & _
"text" & Format(Now, "ddmmmyyyy.") & vbNewLine & vbNewLine & _
"Thanks," & vbNewLine
.Display
End With
Set objMsg = Nothing
End Sub
Last edited by a moderator: