I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace, oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the comment and question:
1. I'm amazed that Outlook 2016 let me do this without any warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/) 2. The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/)
- The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
Frank - I think what you suggested would Send it. He simply wants it on the screen to view. I think its possible that the window is Hidden some how. Must be a way to place it on top.
I've done this kinda stuff in the past - using the same book at examples in it. But, I'm confounded at the "Explorer" references in your code Mike!
FYI - I believe there is a ".Visible" option that you must use somewhere in your code - and THAT may make the email visible to use for viewing before sending! Just a WAG here...
Again - its been YEARS since I did the Office Auto. stuff!
-K-
On 9/3/2019 2:41 PM, Frank Cazabon wrote:
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/)
- The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
No, there's no visible property. I had checked that prior to posting.
On 9/3/2019 7:14 PM, Kurt at VR-FX wrote:
Frank - I think what you suggested would Send it. He simply wants it on the screen to view. I think its possible that the window is Hidden some how. Must be a way to place it on top.
I've done this kinda stuff in the past - using the same book at examples in it. But, I'm confounded at the "Explorer" references in your code Mike!
FYI - I believe there is a ".Visible" option that you must use somewhere in your code - and THAT may make the email visible to use for viewing before sending! Just a WAG here...
Again - its been YEARS since I did the Office Auto. stuff!
-K-
On 9/3/2019 2:41 PM, Frank Cazabon wrote:
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any
warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/) 2. The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft...
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
[excessive quoting removed by server]
Use .Display() instead of .Save()
Gianni
On Tue, 3 Sep 2019 19:41:02 -0400, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
No, there's no visible property. I had checked that prior to posting.
On 9/3/2019 7:14 PM, Kurt at VR-FX wrote:
Frank - I think what you suggested would Send it. He simply wants it on the screen to view. I think its possible that the window is Hidden some how. Must be a way to place it on top.
I've done this kinda stuff in the past - using the same book at examples in it. But, I'm confounded at the "Explorer" references in your code Mike!
FYI - I believe there is a ".Visible" option that you must use somewhere in your code - and THAT may make the email visible to use for viewing before sending! Just a WAG here...
Again - its been YEARS since I did the Office Auto. stuff!
-K-
On 9/3/2019 2:41 PM, Frank Cazabon wrote:
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any
warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/) 2. The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft...
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
[excessive quoting removed by server]
Cool! Yeah - my bad guess - but, hopefully - Gianni is RIGHT!!!
Go for it Mike!
-K-
On 9/3/2019 6:39 PM, Gianni Turri wrote:
Use .Display() instead of .Save()
Gianni
On Tue, 3 Sep 2019 19:41:02 -0400, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
No, there's no visible property. I had checked that prior to posting.
On 9/3/2019 7:14 PM, Kurt at VR-FX wrote:
Frank - I think what you suggested would Send it. He simply wants it on the screen to view. I think its possible that the window is Hidden some how. Must be a way to place it on top.
I've done this kinda stuff in the past - using the same book at examples in it. But, I'm confounded at the "Explorer" references in your code Mike!
FYI - I believe there is a ".Visible" option that you must use somewhere in your code - and THAT may make the email visible to use for viewing before sending! Just a WAG here...
Again - its been YEARS since I did the Office Auto. stuff!
-K-
On 9/3/2019 2:41 PM, Frank Cazabon wrote:
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any
warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/) 2. The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft...
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
[excessive quoting removed by server]
PERFECT!!! That did it!!!!!
On 9/3/2019 9:39 PM, Gianni Turri wrote:
Use .Display() instead of .Save()
Gianni
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Awesome - I'm glad Gianni's suggestion worked. I am quite sure I also used that .Display() option before. But, again - it was SO Many Years ago - and, at my advanced age - Memory Leakage is quite common... :-)
-K-
On 9/4/2019 6:41 AM, MB Software Solutions, LLC wrote:
PERFECT!!! That did it!!!!!
On 9/3/2019 9:39 PM, Gianni Turri wrote:
Use .Display() instead of .Save()
Gianni
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]
Error 0xOldFart: The memory could not be "read"
On Wed, Sep 4, 2019 at 1:15 PM Kurt @ Gmail kurthwendt@gmail.com wrote:
Awesome - I'm glad Gianni's suggestion worked. I am quite sure I also used that .Display() option before. But, again - it was SO Many Years ago - and, at my advanced age - Memory Leakage is quite common... :-)
-K-
On 9/4/2019 6:41 AM, MB Software Solutions, LLC wrote:
PERFECT!!! That did it!!!!!
On 9/3/2019 9:39 PM, Gianni Turri wrote:
Use .Display() instead of .Save()
Gianni
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]
Roflmao...
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Ted Roche Sent: Wednesday, September 4, 2019 3:01 PM To: profoxtech@leafe.com Subject: Re: Outlook Redemption tool
Error 0xOldFart: The memory could not be "read"
On Wed, Sep 4, 2019 at 1:15 PM Kurt @ Gmail kurthwendt@gmail.com wrote:
Awesome - I'm glad Gianni's suggestion worked. I am quite sure I also used that .Display() option before. But, again - it was SO Many Years ago - and, at my advanced age - Memory Leakage is quite common... :-)
-K-
Yeah!
+1
Nice one Ted! Touche!
-K-
On 9/4/2019 12:22 PM, Richard Kaye wrote:
Roflmao...
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Ted Roche Sent: Wednesday, September 4, 2019 3:01 PM To: profoxtech@leafe.com Subject: Re: Outlook Redemption tool
Error 0xOldFart: The memory could not be "read"
On Wed, Sep 4, 2019 at 1:15 PM Kurt @ Gmail kurthwendt@gmail.com wrote:
Awesome - I'm glad Gianni's suggestion worked. I am quite sure I also used that .Display() option before. But, again - it was SO Many Years ago - and, at my advanced age - Memory Leakage is quite common... :-)
-K-
[excessive quoting removed by server]
Kurt,
you could be correct that send(.t.) may just send it. I do have some code that uses it to display the message prior to it being sent, but looking back at the code now, it is referring to a messages object, not a mailitem as in Mike's code, so maybe there is a difference but it's easy enough to try it out.
Frank.
Frank Cazabon
On 03/09/2019 07:14 PM, Kurt at VR-FX wrote:
Frank - I think what you suggested would Send it. He simply wants it on the screen to view. I think its possible that the window is Hidden some how. Must be a way to place it on top.
I've done this kinda stuff in the past - using the same book at examples in it. But, I'm confounded at the "Explorer" references in your code Mike!
FYI - I believe there is a ".Visible" option that you must use somewhere in your code - and THAT may make the email visible to use for viewing before sending! Just a WAG here...
Again - its been YEARS since I did the Office Auto. stuff!
-K-
On 9/3/2019 2:41 PM, Frank Cazabon wrote:
Off the top of my head (and is been a long time since I did this) but try passing true to the send (.t.) I think that might display the email ready to be sent.
On 3 September 2019 16:53:17 GMT-04:00, "MB Software Solutions, LLC" mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I have a need to use MAPI (yes, I know Ted et al: MAPI bad, SMTP good...but this customer wants to see a system generated email in Outlook, review it including file attachment, and then press Send manually). I thought I was going to have to use the Redemption tool to
get around the security issues with Outlook but I'm stunned that this simple code worked on my laptop which has Outlook 2016 on it:
LOCAL oOutlook as Outlook.Application, oNamespace as Outlook.NameSpace,
oMailItem as Outlook.MailItem oOutlook = CREATEOBJECT("Outlook.Application") #DEFINE olFolderDisplayNormal 0 #DEFINE olMailItem 0 oNameSpace = oOutlook.GetNameSpace("MAPI") oExplorer = oOutlook.Explorers.Add(oNameSpace.Folders[1],olFolderDisplayNormal) oMailItem = oOutlook.CreateItem(olMailItem) WITH oMailItem .Subject = 'Testing email send' .Body = "Thank you for your participation in the test at " + TTOC(DATETIME()) .Recipients.Add("mbabcock@mbsoftwaresolutions.com") .Attachments.Add("C:\crap\MyFile.pdf") .Save() *.Send() && commented out for now as I don't want to auto-send...user wants to review and manually Send ENDWITH
oExplorer.Activate()
This is basically using the code from the Microsoft Office Automation with Visual FoxPro book from HWP. (Thanks for the cue, Ted!). Now the
comment and question:
- I'm amazed that Outlook 2016 let me do this without any
warning/blocking. I was thinking I'd have to use the Outlook Redemption add-in tool (http://www.dimastr.com/redemption/) 2. The sample code above saves it to the Drafts folder but when I open OL via the last line (oExplorer.Activate()), I was hoping to have the email front and center so the user could just press the Send button after reviewing it manually on screen. Any ideas how to achieve that?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoft...
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/f7d9c573-16a6-b737-9aaa-f288fa11226e@mbsoftware...
[excessive quoting removed by server]
The security issues only applied (I think) to trying to automate Outlook via Simple MAPI. Extended MAPI, which Craig Boyd's VFPEXMAPI.FLL uses, and MAPI via the Outlook Object Model as you have used, were never a problem in this regard.
On 9/4/2019 5:40 AM, Alan Bourke wrote:
The security issues only applied (I think) to trying to automate Outlook via Simple MAPI. Extended MAPI, which Craig Boyd's VFPEXMAPI.FLL uses, and MAPI via the Outlook Object Model as you have used, were never a problem in this regard.
Thanks for explaining that, Alan...I was scratching my head wondering WTH!?!?!
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus