could you expand upon this - as it is this line where its "having an issue" ?
how would you declare it ?
(I am more of a patch it together user tthan an indepth user )
I got the coding from
https://christiaanheidema.nl/vba/?Tips_and_Tricks___Saving_e-mails_after_sending
I think i will have to re do this to ensure i have not cocked up up
Private Sub QuickEmailSend_Click()
Const bq As String = "<blockquote>"
Const bqe As String = "</blockquote>"
'Dim mi As Outlook.MailItem
'Dim ID As String
'Dim user As String
'Dim sentAfter As Date
'FileName = ID
'###
Dim OL As Outlook.Application
Set OL = New...
#it might be outlook it's not running fast- so my code is going faster than outlook and looking for something that might not of been sent (In outbox rather than sent)
I will revert one way or the other - I don't have access to Outlook controls -so I need to get my techies to resolve
Yes its looking for the ID (stored in the catagories in outlook)
ID = Format(Now(), "yyyymmddhhnnss") & "_" & CInt(1000 * Rnd()) + 1
' Save date and time
sentAfter = Now()
' Change mail item properties
With mi
.To = Nz(Me.email)
.Subject = Subjectz
.Categories = ID
findSentItem_start:
With sfolder
' With olkns.GetDefaultFolder(olFolderSentMail)
Set items = .items.Restrict("[SentOn] >= '" & Format(sentFromTime, "ddddd h:nn AMPM") & "'")
For Each item In items
If TypeName(item) = "MailItem" Then
If...
here is the issue bit (been fine for two years or so )
Set mi = FindSentItem(ID, sentAfter)
Sentstamp = mi.SentOn
' E-mail has been sent
If Not (mi Is Nothing) Then
so its going int runtime error 91 :
Object Variable or with block variable not set
Hi guys -- been a long time
OK I have a email fuction that sudden has a tantrum and comes up with runtime error 91 ...
but I have been using this for a couple of years and its only now kicked in this week -
any ideas why - I will post the code etc up or should I see if an update has...