Results 1 to 2 of 2

Thread: Command Button to Email without Outlook

Hybrid View

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2019

    Command Button to Email without Outlook

    I don't really have much VB skills, but I have a Word document that I have setup for work where staff enter information into the Word document using drop down lists. They then click the "Submit" command button which runs a macro that emails the document to me.

    It works well however it requires an email client to be installed on each computer. Is there code that can send the Word document without the need of an email client?

  2. #2
    Join Date
    Dec 2004

    Re: Command Button to Email without Outlook

    yes, you can use cdo.message, vbsendmail (or other), but for either you have to supply the all the required settings, which are user dependent, the only work around for that would be to use an email account of your own using gmail or similar mail service

    cdo.message is built into windows and there would be many examples in this or the vb6 forum that should get you started, either using user settings or a gmail account
    to use a gmail account you would have to go into your gmail settings and allow less secure mode, you will also find information on that in some of the posts
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed

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