Results 1 to 17 of 17

Thread: send email from Excel caused PopUP

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144

    Question send email from Excel caused PopUP

    Hi,
    I have a VBA routine for Excel to send email using Outlook from the client where the macro is executed. Is there a way to bypass the popup especially from Win2000 asked whether I concur on having this email send out (I think it's a security thing).

    Any helps would be greatly appreciated.

    PhiL

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    There is now easy way to get around the security popup. This
    only gets tighter with each new version of Outlook One way
    around it is to create an Outlook add-in and if this is just for your
    workstation, the you can create a digital signature for it and
    make it trusted.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144
    this is just for my workstation, can you direct me on how to create a digital signature and make it trusted so I can send email from my vba ?

    Thanks,

    PhiL

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    For Office 2003:
    D:\Program Files\Microsoft Office\OFFICE11\SELFCERT.EXE

    For XP:
    D:\Program Files\Microsoft Office\Office10\SELFCERT.EXE
    etc.

    Run the program and follow the simple steps. It will create the
    digital signature or certificate for vba projects.

    Then in the VBA editor click Tools > Digital Signature... and click
    Choose button and select the certificate you just created.

    This will attach the signature to the project.

    You can also set the security on Excel to High - only signed macros
    from trusted sources will be run.
    So only your macros will run.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144

    Unhappy

    Hi,
    I followed every step and got my Self Certificate created. I created the name to match my email address, to match my email name, my logon name but none of those CERTs make any different when I add it one at a time on the VBA editor => Tools, digital cert... when I ran the Macro and it attempt to send myself an email and there goes the PopUp again

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Since you are using two Office applications and Excel is trying to
    execute the sending of email, you will need to create the VBA
    project in Outlook, not in Excel. Then sign the project in Outlook.
    To have Outlook trust emailing, the signature VBA needs to be in
    Outlook.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Oh ya, I almost forget. You also need to Import your certificate to
    the "Trusted Root Certification Authorities store".
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Junior Member
    Join Date
    Feb 2004
    Location
    Hull, England
    Posts
    19
    Just to post a different option to the above, see the Thread: Emailing A Workbook - Can't get code to work
    http://www.vbforums.com/showthread.p...hreadid=282579

    With this there is no MAPI, and thus no Outlook Security warning anymore, but neither is a copy saved in your Mailbox, nor are the CDONTS/CDOSYS/CDOEX email components portable across all Windows versions, and none are supported in Windows 9x.

    If you find that Thread useful you may want to add a bogus post to stop it dropping off the Forum. I am sure RobDog888 & Co's guidance will work OK.
    Last edited by markf; Apr 3rd, 2004 at 02:27 PM.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144
    Thanks I will post.

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Were you not able to get the digital signature to work for you?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144
    "Since you are using two Office applications and Excel is trying to
    execute the sending of email, you will need to create the VBA
    project in Outlook, not in Excel. Then sign the project in Outlook.
    To have Outlook trust emailing, the signature VBA needs to be in
    Outlook."

    You asked me to create the VBA project in Outlook, not in Excel. But I must have my VBA done in Excel andthen send an email from within Excel to my inbox.

    "Oh ya, I almost forget. You also need to Import your certificate to the "Trusted Root Certification Authorities store"."

    then this post, really lost me. So, what I ended up doing, I removed the Office2000 and reinstalled. Although it still exhibits as SP3 but the email send fine from within Excel. I 'd love to know how to use the digital certificate but I am new to certificate on PC.

    Thanks,

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    To make you Digital Signature Certificate "Trusted"...

    Export the D.S.
    After you create your D.S. view it like when you assign the D.S. to
    your VBA project - Tools > Digital Signature > Choose... > Select
    your certificate > View Certificate > Details Tab > Copy to file...
    Then you will see the Certificate Export wizard. Click Next > Next
    > Next > Browse to where you want to save it to (*.cer) > Next >
    Finish.

    Import the certificate
    Browse to where you exported the certificate to and double click
    it and wait for it to display the certificate. Then click Install
    Certificate... > Next > Select "Place certificate in the following
    store." and browse to "Trusted Root Certification Authorities" >
    Next > Finish > Yes. Then your done.

    Then check your VBA project's Digital Signature and it should
    show that it is now "Trusted". If not, remove the Digital Signature
    and then re-attach it to your VBA project again. You will no longer
    see the little red circle x next to the certificate name.

    This is good stuff, maybe I should code bank it?

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144
    Thank you for providing the detail instruction.

    Here is what I did:
    1) Create another D.S.
    2) assign the D.S. to my VBA (Excel)
    3) export the D.S.
    4) successfully imported the D.S. to my VBA as you indicated, the red X mark is no longer there.
    5) Execute my VBA

    Despite all that, I am still getting the Outlook popup.
    Attached Images Attached Images  

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    You are probably getting the popup because your code is in Excel
    and the ds does not cross office applications. Another idea is to
    create a COM Add-In, but I haven't done one for two applications
    in the same add-in. Maybe the add-in for Excel can execute the
    add-in for Outlook? I remember reading that you can create a
    single add-in for all of the office suite programs. This is what you
    may need. Try searching M$ for more on this.

    Sorry I don't have more info on this for you.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Location
    Texas
    Posts
    144
    Thanks RobDog888. I will live with the downgrade of my office2000 to avoid the Outlook Popup. If you ever know of a solution, please post.

    Thanks again,

    PhiL

  16. #16
    New Member
    Join Date
    Apr 2004
    Posts
    7
    Try looking at this... http://www.dimastr.com/redemption/ It is a control that will allow you to create and send e-mails without seeing the message.

  17. #17
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Looks good, but @ $199.00 I think I can code around the
    limitations like by using CDO or SMTP. Also, its slower and its not
    exaclty the same as using the OOM properties directly, can't get
    to the htmlbody property just the rtfbody prop.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width