Is there a way for me to create a button in my user form that after the file is saved when clicked attaches the file to an email?
Thanks
Printable View
Is there a way for me to create a button in my user form that after the file is saved when clicked attaches the file to an email?
Thanks
Assuming you are talking about a Word Macro and User Form, this is how you would attach an already saved file using a button on a user form:
Code:Private Sub cmdSend_Click()
AttachFile ActiveDocument.Path & Application.PathSeparator & ActiveDocument.Name
End Sub
Function AttachFile(tPath)
Set out = CreateObject("outlook.application")
Set myitem = out.CreateItem(0)
myitem.Subject = tPath
myitem.Body = "Here is the attachment you wanted."
myitem.Attachments.Add tPath
myitem.Display
End Function
One problem. I am using Novell Groupwise... Is there a way I can do it with that?
I don't have any experience with Novell Groupwise. I'm not sure... Maybe create a MAPI session and work through it that way, but like I said, I don't know anything about Novell Groupwise. Try search the web - altavista might be your best bet.
I have this code to send an attach this worksheet. It WORKS, but, how can i send to multiple recipients instead of just one. Here is the code I have
How can I add one more person to the recipient. Even better, how can I add Carbon Copy (CC) to it instead.
Thanks
Not sure about the CC field. Maybe just CC:="whatever". I doubt it though. But in the "To:" line you should be able to insert multiple addresses by seperating them with a semicolon (;). Hope this helps.
We tried that but, I figured this out
Thanx AnywayCode:ActiveWorkbook.SendMail Recipients:=(range("A1:A2")