Consulting

Results 1 to 14 of 14

Thread: Email userform

  1. #1

    Email userform

    I completed my userform, wanted to know how to email the filled form via outlook.
    I mean copy/paste userform as image

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    I am unclear what you mean by the last part. Did you want it in the email as an image file attached or embedded in the body of the email?

    Is this to be done while the userform is active in its code? Or should a macro find the userform, open it, copy, send email, and close it?

  3. #3
    The user form runs by click of a cell
    After I fill in all details in userform it is copied to worksheet.
    I have made buttons in userform to save the record and save and send.
    I want when I click on save and send, record should be saved and the same userform should be emailed to employee.
    I know about outlook code, but I don't know how can I send the userform as an image in email.
    I don't want it as attachment

  4. #4
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    In post #3, are you saying that you have already copied the userform to the worksheet or you want to add that as well?

  5. #5
    Let me explain with an example in detail
    I have a userform (ABC)
    It has 2 lables (Emp I'd and Name)
    It has 2 text box (for entering Emp I'd and name)
    It has 2 buttons (Save and Save and Send)
    When I click save button the Emp I'd and Names are saved to Sheet 1 as text.
    I also want to email the userform to the employees.
    So when I click on Save and Send.
    Excel should use print screen option and copy the filled userform.
    After that outlook should open and paste the userform as a image in the mail

  6. #6
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Ok, so you need both copy Userform and email with it pasted in the body. I will show you how shortly.

    There are two ways to copy the current window. One is a SendKeys() or API SendKeys() method. API is the better route. Even so, there are other API methods that I like better that I will use.

    For the email part, I will use Outlook since it allows us to use the Suite's Word object.

  7. #7
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    It is easier to show you by an example file. The example for you is UserForm1. Click the button on the first sheet to show it. Fill in the To and Subject boxes and click the button. It will Display the email.

    This has an example that uses some other methods and handy tools as well.
    Attached Files Attached Files

  8. #8
    Very good

  9. #9
    Print screen/Snip tool is disabled in the system.
    Cannot be used
    Any other alternatives.

  10. #10
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    If you mean manually snipping in Windows, I guess you mean Snipping Tool. OneNote is better. Surely that is not disabled. Run once and then Win+S or Win+Shift+S will allow snipping.

  11. #11
    I am sorry, but most of the features are disabled in system.
    Can't even combine windows taskbar icons.
    Only thing that works is excel, word, outlook, Is(with site restrictions) that's it

  12. #12
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    That is very restrictive. So PowerPoint does not work either? As you should know, OneNote is a standard application in the Office Suite.

  13. #13
    One note, ppt also restricted.
    Print screen, snipping tool, drive icons
    Everything restricts

  14. #14
    I searched the web and found that we can use vk snap method.
    Not sure what that us, but it copy the screen like a print screen

Posting Permissions

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