Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
From Early binding to Late binding Henk Excel Programming 1 February 12th 09 11:37 AM
Late Binding examples of binding excel application HeatherO Excel Programming 13 March 17th 05 08:19 AM
late binding in excel Grey Excel Programming 2 May 24th 04 08:26 AM
late binding in excel Grey Excel Programming 3 May 22nd 04 05:15 PM
EARLY binding or LATE binding ? jason Excel Programming 6 February 26th 04 04:57 PM


All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"