|
-
Apr 7th, 2006, 10:03 AM
#3
Thread Starter
Member
Re: VBA Macro to save a document then email as an attachment
Hi, thanks for the reply
I must be doing soemthing wrong, entered the code;
Private Sub Commandbutton2.Click()
SaveFileName= _
InputBox( _
"Enter a name for the letter", _
"Letter name ?")
If SaveFileName <> "" _
Then
ActiveDocument.SaveAs (SaveFileName)
Options.SendMailAttach = True
ActiveDocument.SendMail
End Sub
The document is saved as a .dot file, so when I double click on the file it loads it as Document.doc, but when I click on the button it doesn't do much, when I double click on it it loads the text above in Microsoft Visual Basic interface.
ANy ideas where I'm going wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|