Here is my Case statements but it did not create the Appointment Item
For i = 1 To 3
With Reg1
Select Case i
Case 1
.Pattern = "(Location\s*[:]([\w-\s]*)\s*)\n"
.Global = False
Case 2
.Pattern = "(Start[:][\d]+[\/-][\d]+[\/-][\d])\n"
.Global = False
Case 3
.Pattern =...
Thank you so much Diane for your help! This does indeed work. I changed the .Display to .Save
Now the next part I need to do is probably set-up CASE statements that would then take Date strings out of the body of the email and put them into the .Start and .End time of the AppointmentItem...
This is what I had put into my code that I wrote above in order to just see if I can change the location in the appointment item from a string in the body of the email.
With Reg1.Pattern = "Location\s*[:]+\s*(\w*)\s*"
.Global = True
End With
If Reg1.test(incoming.Body) Then
Set M1 =...
Here is my script that runs as a rule as soon as new email's come into the account. What I need is to have the start time and end time being defined in the body of the email. This code does work just need the Dates fixed for the appointment item.
Sub RunscriptMacro(MyMail As MailItem)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.