Hi Chippy,
Have had a play with the code you linked to, and it looks promising but doesn't quite work. Hoping you can give me some pointers. Here's the code with my amendments so far:
C104 is the reminder text, C112 is the reference number, C111 is the date specified by user.
It mostly works... It can create an entry in the calendar on the day specified and add the client number + reminder text in the body. The problem comes when trying to amend to an existing entry. It completes without any errors, and when I step through the code the currentText variable fills with the current body text, adds a new line and the text to be added as expected. Then it gets interesting.
If while stepping through the code I check the calendar entry (opening then closing after each line runs) I can see that the line "olApt.Body = currentText" does it's job, the body text is amended with the new line as intended. I step through a little further and as soon as the "end sub" in Private Sub Create_Appointment runs the text that was previously added is removed and the entry returns to whatever it was before the macro was run. No other lines highlight to show that additional code was executed to remove the line, it returns to the public sub at the end of the second if statement as expected - I'm baffled by this. Outlook does show a pop up to authorise a programs access to it, but I assume after allowing access that shouldn't cause any issues.
I'm thinking I could work around this issue by pulling the body text into a temp variable, deleting the appointment and creating a new one with all the body text that should be included, but I'm hoping there's a better way... Any thoughts?
Regards
Duane
Bookmarks