+ Reply to Thread
Results 1 to 3 of 3

Adding an appointment to Outlook from Excel invoice.

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    oxford
    MS-Off Ver
    MS-Off 2010 & 2016
    Posts
    16

    Adding an appointment to Outlook from Excel invoice.

    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

  2. #2
    Registered User
    Join Date
    10-22-2014
    Location
    Birmingham UK
    MS-Off Ver
    Various
    Posts
    55

    Re: Adding an appointment to Outlook from Excel invoice.

    did you resolve this a i have the same issue with the .body and range

  3. #3
    Registered User
    Join Date
    12-21-2012
    Location
    oxford
    MS-Off Ver
    MS-Off 2010 & 2016
    Posts
    16

    Re: Adding an appointment to Outlook from Excel invoice.

    this remains unresolved, i abandoned this in the end.

    Liam

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vba macro to add appointment to outlook from excel
    By slohman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-06-2013, 08:21 PM
  2. Send outlook appointment to others using excel VBA
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2013, 09:04 PM
  3. Adding an appointment to Outlook from Excel with VBA
    By bibleguy125 in forum Excel General
    Replies: 8
    Last Post: 11-29-2012, 09:35 AM
  4. Create Outlook Appointment in Excel VBA
    By newbie28 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2011, 10:27 AM
  5. Linking excel to Outlook appointment
    By Slartibartfast in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 04-07-2009, 12:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1