Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Late Binding in Excel
I have a sheet that is currently being converted to a pdf and e-mailed
on a nightly basis. I have an e-mail sheet button that reaches out to a .pdf, attaches it to a message, and sends the message. Everything was written in Excel 2000 but when the sheet is opened in Excel 2003 and then re-opened in Excel 2000 the Outlook reference is still looking for Outlook 11. I've read that I can alter the code to use late binding to solve this problem however I have not been able to implement this successfully with my code. Could someone take a look at the code below and tell me how I can alter it to make it late binding? Your help is appreciated. Thanks 'Email Sheet Dim WhatFile As String Dim distRecipients As String Dim distcc As String WhatFile = "C:\Documents and Settings\admin\My Documents \Sheet.pdf" distRecipients = " 'distcc =' Dim olApp As New Outlook.Application Dim Msg As Outlook.MailItem Set Msg = olApp.CreateItem(olMailItem) With Msg .To = distRecipients .CC = distcc .Subject = "Gauge Sheet" .Attachments.Add Source:=WhatFile .Send End With Set Msg = Nothing Set olApp = Nothing End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Late Binding in Excel
See how you can use late in the Outlook object model examples here
http://www.rondebruin.nl/sendmail.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm wrote in message ... I have a sheet that is currently being converted to a pdf and e-mailed on a nightly basis. I have an e-mail sheet button that reaches out to a .pdf, attaches it to a message, and sends the message. Everything was written in Excel 2000 but when the sheet is opened in Excel 2003 and then re-opened in Excel 2000 the Outlook reference is still looking for Outlook 11. I've read that I can alter the code to use late binding to solve this problem however I have not been able to implement this successfully with my code. Could someone take a look at the code below and tell me how I can alter it to make it late binding? Your help is appreciated. Thanks 'Email Sheet Dim WhatFile As String Dim distRecipients As String Dim distcc As String WhatFile = "C:\Documents and Settings\admin\My Documents \Sheet.pdf" distRecipients = " 'distcc =' Dim olApp As New Outlook.Application Dim Msg As Outlook.MailItem Set Msg = olApp.CreateItem(olMailItem) With Msg .To = distRecipients .CC = distcc .Subject = "Gauge Sheet" .Attachments.Add Source:=WhatFile .Send End With Set Msg = Nothing Set olApp = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
From Early binding to Late binding | Excel Programming | |||
Late Binding examples of binding excel application | Excel Programming | |||
late binding in excel | Excel Programming | |||
late binding in excel | Excel Programming | |||
EARLY binding or LATE binding ? | Excel Programming |