Good Day All
im hoping you will be able to help, i have the below macro in place:-
the string in bold is throwing back an error, without that line the macro works perfectly. however im looking to add a snapshot of the invoice in to the body of the appointment. so basically im looking to alter it from pulling just one cell to a range (A1:J64). i do understand that if it does pull it, Cell sizes and margins will be off but that isnt a concern.
im basically looking to use this feature as a quick and easy way to reference to past invoices on the fly and to centralise the Invoice archive.
is this possible and can you help.
Sub Appointments()
Const olAppointmentItem As Long = 1
Dim OLApp As Object
Dim OLNS As Object
Dim OLAppointment As Object
On Error Resume Next
Set OLApp = GetObject(, "Outlook.Application")
If OLApp Is Nothing Then Set OLApp = CreateObject("Outlook.Application")
On Error GoTo 0
If Not OLApp Is Nothing Then
Set OLNS = OLApp.GetNamespace("MAPI")
OLNS.Logon
Set OLAppointment = OLApp.CreateItem(olAppointmentItem)
OLAppointment.Subject = Range("B88").Value
OLAppointment.Start = Range("B91").Value
OLAppointment.Duration = Range("C91").Value
OLAppointment.ReminderMinutesBeforeStart = Range("D91").Value
OLAppointment.Body = Range("A1:J64").Value
OLAppointment.Save
Set OLAppointment = Nothing
Set OLNS = Nothing
Set OLApp = Nothing
End If
End Sub
thank you to all of you that can assist.
many thanks
Liam
Bookmarks