Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 43
Default Requesting return reciept in Outlook 2002 from Excel

I need to request Receipts from OUTLOOK but only for emails sent out from
EXCEL via the code below. Can modify the code to request reciept on an send
basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic Sans
MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 860
Default Requesting return reciept in Outlook 2002 from Excel

Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read receipt
request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request reciept
on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 43
Default Requesting return reciept in Outlook 2002 from Excel

Does it only effect the NEXT email? I just need to make sure!

Thanks
Bruce

"Jake Marx" wrote in message
...
Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read receipt
request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request reciept
on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 860
Default Requesting return reciept in Outlook 2002 from Excel

Yes, you're only modifying the properties of that one MailItem object. But
you should test your code just to make sure. <g

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
Does it only effect the NEXT email? I just need to make sure!

Thanks
Bruce

"Jake Marx" wrote in message
...
Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read
receipt request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request
reciept on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub


  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 43
Default Requesting return reciept in Outlook 2002 from Excel

I added the line, but I am still not getting the "Originator Delivery
Requested" flag, and I am not getting the reciepts. I am manually pressing
the SEND, as sometimes I need to edit the message. Am i doing something
wrong here?
Code is attached as it is currently in the app.

Thanks,
Bruce

Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic Sans
MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.ReadReceiptRequested = True
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub
"Jake Marx" wrote in message
...
Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read receipt
request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request reciept
on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub






  #6   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 860
Default Requesting return reciept in Outlook 2002 from Excel

Sorry, Bruce - I thought you were looking for a *read* receipt. If you want
a delivery confirmation, then you can try this:

mi.OriginatorDeliveryReportRequested = True

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I added the line, but I am still not getting the "Originator Delivery
Requested" flag, and I am not getting the reciepts. I am manually
pressing the SEND, as sometimes I need to edit the message. Am i
doing something wrong here?
Code is attached as it is currently in the app.

Thanks,
Bruce

Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.ReadReceiptRequested = True
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub
"Jake Marx" wrote in message
...
Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read
receipt request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request
reciept on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub


  #7   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook.program_vba
external usenet poster
 
Posts: 43
Default Requesting return reciept in Outlook 2002 from Excel

You have NO reason to be sorry! IYou gave me what I asked for! I just did
not know what I wanted!

Thanks!
Bruce

"Jake Marx" wrote in message
...
Sorry, Bruce - I thought you were looking for a *read* receipt. If you

want
a delivery confirmation, then you can try this:

mi.OriginatorDeliveryReportRequested = True

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I added the line, but I am still not getting the "Originator Delivery
Requested" flag, and I am not getting the reciepts. I am manually
pressing the SEND, as sometimes I need to edit the message. Am i
doing something wrong here?
Code is attached as it is currently in the app.

Thanks,
Bruce

Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.ReadReceiptRequested = True
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


End Sub
"Jake Marx" wrote in message
...
Hi Bruce,

mi.ReadReceiptRequested = True

That line, executed before sending the email, should add a read
receipt request to the message.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


BruceJ wrote:
I need to request Receipts from OUTLOOK but only for emails sent out
from EXCEL via the code below. Can modify the code to request
reciept on an send basis via code?

Thanks
Bruce
--------------


Sub UseDefSig(FileNAME)


Dim ol As Outlook.Application
Dim mi As MailItem
Dim MyHtm As String
Dim AutoSig As String
Dim TheSig As String
Dim strIn As String
Dim FNum As Long
FileNAME = "c:\scripts\" & FileNAME
FNum = FreeFile
Open FileNAME For Input As FNum

Do While Not EOF(FNum)
Line Input #FNum, strIn
TheSig = TheSig & vbCrLf & strIn
Loop
Close FNum

Set ol = New Outlook.Application
Set mi = ol.CreateItem(olMailItem)

mi.Display

MyHtm = mi.HTMLBody ' or MyHtm = TheSig
MyHtm = "<font size=""4""<font color=""blue""<b<font face=""Comic
Sans MS"""
MyHtm = MyHtm & "Hi " & ActiveCell.Offset(0, 1).Value & ","
MyHtm = MyHtm & "</font</b</font" & TheSig
mi.To = ActiveCell.Offset(0, 4)
mi.HTMLBody = MyHtm
mi.Subject = ActiveCell.Offset(0, 1) & ", " &
ThisWorkbook.Sheets("Scripts").Range("b80").Value


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
Open Excel 2002 Attachment from Outlook 2002 Youlan Excel Discussion (Misc queries) 0 May 30th 08 10:34 PM
Excel 2002 : Unable to open files in MS Outlook 2002 Mr. Low Excel Discussion (Misc queries) 1 June 29th 07 02:12 PM
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl scampbell Excel Worksheet Functions 0 February 22nd 06 06:31 PM
Excel 2002 vs Outlook 2003 Bill Clark Excel Discussion (Misc queries) 1 December 2nd 04 09:03 PM
Excel 2002 files attached to Outlook 2002 EMails change size AJStadlin Excel Programming 1 October 15th 03 12:12 AM


All times are GMT +1. The time now is 07:31 AM.

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

About Us

"It's about Microsoft Excel"