Re: Saving a single work***
- From: "Ron de Bruin" <rondebruin@xxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 16:22:06 +0100
Use only this line in the click event
Call MacroName
Also, if I use display under the lines for OutMail will it stop at the point where I will have to push the send button for the message to go?
Correct
Download the example workbook from my site and you will see it
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Shawn" <Shawn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:AFC93654-73CD-4408-8CC4-AA175AEB1A29@xxxxxxxxxxxxxxxx
Ron,.
I used the script for Mil one *** in Outlook object model (attachment). I am trying to apply this macro to a command button in the ***. The command button applies: Private Sub CommandButton1_Click()
Which is expecting and End command. If I delete that nothing happens when I try the button. What should I do? Also, if I use display under the lines for OutMail will it stop at the point where I will have to push the send button for the message to go?
With OutMail
.To = "mark.may***@xxxxxxxxxxxxxxx"
.CC = "Central Lab"
'.BCC = ""
.Subject = "Central Lab Weekly WIG Update"
.Body = "Weekly WIG Update"
.Attachments.Add Destwb.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
"Ron de Bruin" wrote:
Hi Shawn
See
http://www.rondebruin.nl/sendmail.htm
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Shawn" <Shawn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B30EC482-1FED-4D84-A27C-E14C46BC0DF6@xxxxxxxxxxxxxxxx
>I am trying to ise a command button to save a single work*** from a > workbook to export to outlook and mail it. So far I have the following which > works fine but mails the whole workbook. My code is not good so details are > appreciated.
> Private Sub CommandButton1_Click()
> '
> '' Email ***
> ' Taken from Dustin's time*** macro
> ' 1/28/08
> '
> > Dim Fname
> Fname = Active***.Name
> > Range("A1:N41").Select
> Selection.Copy
> 'Sheets.Add
> Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
> xlNone, SkipBlanks:=False, Transpose:=False
> ActiveWindow.DisplayGridlines = False 'added
> Application.CutCopyMode = False 'added
> Application.StandardFont = "Tahoma"
> Application.StandardFontSize = "10"
> Application.CutCopyMode = False
> Selection.Copy
> Application.CutCopyMode = False
> Selection.Copy
> Application.CutCopyMode = False
> Selection.Copy
> Active***.Paste
> With Active***.PageSetup
> .TopMargin = Application.InchesToPoints(0.5)
> .BottomMargin = Application.InchesToPoints(0.25)
> End With
> ChDir "C:\"
> Application.DisplayAlerts = False
> ActiveWorkbook.SaveAs Filename:="C:\SHD_current_week.xls", FileFormat:= _
> xlNormal, Password:="", WriteResPassword:="", > ReadOnlyRecommended:=False _
> , CreateBackup:=False
> Application.DisplayAlerts = True
> Application.Dialogs(xlDialogSendMail).Show
> End Sub
> >
- Follow-Ups:
- Re: Saving a single work***
- From: Shawn
- Re: Saving a single work***
- References:
- Saving a single work***
- From: Shawn
- Re: Saving a single work***
- From: Ron de Bruin
- Re: Saving a single work***
- From: Shawn
- Saving a single work***
- Prev by Date: Re: Error, Excel 2000 & 2003
- Next by Date: Re: Color rows by "group"
- Previous by thread: Re: Saving a single work***
- Next by thread: Re: Saving a single work***
- Index(es):