Hi people.
As you know I have been working on emailing a screenshot of a UserForm. I have successfully created the UserForm, coded the features to copy the form image to the clipboard, paste it into the body of a Word document, set the emailing parameters (To, Cc, Subject, etc.), but I was having trouble submitting the document to a Mail Recipient. I actually was able to submit the dicument with the image of the form in the body of the email, but I encountered a message box and an error on the .Send line.
I decided to simulate the "keystokes" with SendKeys instead of using .Send.
The problem is something with my message boxes are preventing the SendKeys from working although the SendKeys are not contained in the decision structure (If vbOk Then). It will work if I comment out the MsgBoxes, or if I put the SendKeys in the Form_Terminate() Sub.
I am puzzled. Anyone have some insight? DAVE
As you know I have been working on emailing a screenshot of a UserForm. I have successfully created the UserForm, coded the features to copy the form image to the clipboard, paste it into the body of a Word document, set the emailing parameters (To, Cc, Subject, etc.), but I was having trouble submitting the document to a Mail Recipient. I actually was able to submit the dicument with the image of the form in the body of the email, but I encountered a message box and an error on the .Send line.
I decided to simulate the "keystokes" with SendKeys instead of using .Send.
The problem is something with my message boxes are preventing the SendKeys from working although the SendKeys are not contained in the decision structure (If vbOk Then). It will work if I comment out the MsgBoxes, or if I put the SendKeys in the Form_Terminate() Sub.
I am puzzled. Anyone have some insight? DAVE