Email Directly From Within A Workbook

Jul 11, 2006

I have found some code that allows me to email directly from within a workbook, but the example only contains one addressee, I wish to send to 3 or 4 different addresses, these addresses would remain constant once entered. How do I alter the code?

Sub sendactiveworkbook()
ActiveWorkbook.SendMail _
Recipients:="type-in-email-address", _
Subject:="New Quote Raised - Test Transmission " & Format( Date, "dd/mmm/yy")
End Sub

View 3 Replies


ADVERTISEMENT

Zip Workbook & Email

Dec 1, 2006

Does anyone have one of these or do I need to modify some of the others out there? I've seen a few macros that accomplish these tasks but I want to have the user simply click a single button and have the active workbook zipped and sent to outlook. Is this possible or will it need to be saved under a different name first?

View 3 Replies View Related

Close A New Workbook After Email

May 7, 2009

I have the below code in a macro attached to a button. Basically, if i choose yes to the message box at the beginning then the macro copies the all the cells on the sheet 'selections', opens up a new workbook, pastes into here, deletes some unused cells, rows and columns, then sends the sheet as an attachment on an e-mail.

What i also need to do is when i have sent the e-mail, the macro closes the new workbook without saving changes.

View 13 Replies View Related

Email Upon Workbook Opening

Jul 28, 2006

I hope this is not a violation of any of the security rules. At work, we are wanting to track when users open up a workbook by sending an email (not my idea). I have the email on open part working just fine, I wanted to know if there is an option that it does not save the sent message in the sent folder?

Private Sub Workbook_Open()
Run "EmailMacro"
End Sub
Sub EmailMacro()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "User xx has opened workbook" & vbNewLine & vbNewLine & _
"..." ...................

View 5 Replies View Related

Email One Sheet In Workbook Through Outlook?

Aug 29, 2012

I have attached a version of my file with code that I have adjusted. Everything is working except for the save as portion of it. I keep getting a run time error 1004. The save as of the workbook failed. Also, when I run the macro in the template that I have uploaded it opens up the original file that I had the code in.

View 2 Replies View Related

Disable Workbook From Being Forwarded Via Email

Jul 22, 2014

Is this even possible?

View 4 Replies View Related

Email A Single Sheet From A Workbook

Sep 30, 2009

I have a spreadsheet that has approx 10 different sheets (tabs at the bottom). I want to write a routine that will take one of the sheets, copy it to a new workbook, and email the newly created workbook using Outlook.

I've entered this question once before and got some suggestions that seemed to work for a while. Then it became hit and miss as to whether it worked or not. Now I'm geting a "Can't create object" error everytime. I want to break this one sheet out and send only it because I don't want to send the entire workbook.

View 4 Replies View Related

Send Excel Workbook By Email

Oct 10, 2011

I have a macro that will send an excel workbook by email when an image is 'Clicked on' however, I need the attachment to be renamed as the text used in cell B9 of this worksheet.

So far I have the macro below which auto populates the 'email to' address and the 'subject' line which is great but how do I get to rename the attachment?

Sub SendIt()
Application.Dialogs(xlDialogSendMail).Show
arg1:="test@test.com", _ arg2:="test 1" End Sub

View 2 Replies View Related

Email Via Excel (Format Not Workbook)

Jan 4, 2012

I have a format and i want to put information in the format and send email only format not all workbook . i use also outlook for Email

View 9 Replies View Related

Send Email Before Workbook Close?

Jul 2, 2014

Does anyone know if its possible to run a macro to send email before the workbook is closed?
I know theres a code for it

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Right now, it seems like my macro is send email macro is not running when i close the workbook.

View 2 Replies View Related

How To Attach Current Excel Workbook To Email

Sep 19, 2013

show me the visual basic codes that allow me to attach the current saved workbook to an email (just attach, but not to send the file). So basically, just open the Outlook, send to, and attach the file.

View 6 Replies View Related

Send Workbook Via Email To Multiple Recipients

Nov 23, 2008

I am using the following code to try and send a workbook via attachment to multiple email recipients however it will not work. If I only include one recipient then the code runs fine however it crashes when there is more than one.

View 8 Replies View Related

VB Code To Email Single Worksheet Within Workbook

Jan 27, 2009

I need a code to be applied to a VB button that will email out a selected worksheet within the workbook, lets say i need to email out sheet5. Is it possible when the button is clicked to bring up my email client, (it's not Outlook) with the file already attached so i just need to add the email address/adresses?

View 9 Replies View Related

Email 2 Of Spreadsheets From Workbook Via Lotus Notes

Feb 18, 2013

I have found the code that I need to send one spreadsheet or the entire workbook via lotus notes through VBA, but I cannot seem to find the way to email 2 specific spreadsheets anywhere..

I have tried both of these, but I get an error when running:

Code:
With Worksheets("Diario") And Worksheets("Periodo")
.Copy
stFileName = Worksheets("BD").Range("A1").Value & "- NDG " & Worksheets("Code").Range("K22").Value
Debug.Print stFileName
End With

Code:
With Sheets(Array("Diario", "Periodo"))
.Select
Selection.Copy
stFileName = Worksheets("BD").Range("A1").Value & " - NDG " & Worksheets("Code").Range("K19").Value
Debug.Print stFileName
End With

I would like the 2 sheets (Diario & Periodo) to be copied both to the same temporary workbook...

View 1 Replies View Related

Copy Range Of Cell From One Workbook To Another And Email

Nov 3, 2013

I need to copy a range of cells from one workbook paste into another and email that new work book.

View 3 Replies View Related

Email Workbook From Excel Using Range As Address

Mar 2, 2010

I want my macro to be able to mail the active workbok through outlook using the email addressses in Cell R1 and having the body of the email have the text in cell R2:R8?

Dim OutApp As Object
Dim OutMail As Object
Dim ws As Worksheet
Dim range as range

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.To = ws.Range("R1:R8").Value
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = ws.Range("R2:R8").Value
.Send 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing

View 9 Replies View Related

Force Single Instance Of Excel When Opening New Workbook From Email?

Aug 28, 2013

I have multiple buyers that use an Excel workbook containing several macros to perform edits on other workbooks they receive via email. Generally, they have the workbook containing the macros open, and they can double-click the workbooks they receive in the email messages to open them, and the macros are available from the "master" workbook.

Recently, however, some of the buyers have been getting new computers running Windows 8 and Office 10. Now when they have the "master" workbook open, and double-click the attached workbook in an email, (Outlook 10), the new workbook opens in a new instance of Excel, and as a result the macros are not available to run on the newly opened workbook.

The work around has been to right-click the attachment and save it to their desktop, and then use the File/Open command from the "master" to open the new file. This is a hassle and takes extra time.

I'm sure I am overlooking a setting somewhere that tells Excel to always open new workbooks using the same instance of Excel, (there are two people using the new systems that aren't having problems, and two that are), but for the life of me I can't find where to set these parameters.

View 6 Replies View Related

Excel 2010 :: Send Workbook In Email With Subject And Message?

Nov 29, 2012

I did this 10 years ago so I admit I am rusty at this but here are what I had in my notes that worked with Excel XP. I am currently using Excel 2010

With ThisWorkbook
.HasRoutingSlip = True
With .RoutingSlip

[Code]....

The last line will send the workbook but I need a Subject and Message to go with it.

View 9 Replies View Related

Excel 2007 :: Save Files XLS In Macro Workbook And Send Email

Sep 3, 2012

I am using 2007. This may be something simple but I can't seem to find a solution to this, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file here is the code used for the tasks in the

workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'
ActiveWorkbook.RefreshAll
End Sub
Sub step2_save_close()

[Code] ........

View 1 Replies View Related

Excel 2007 :: Save Files XLS In Macro Workbook And Send Email?

Sep 3, 2012

I am using 2007, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file.

Here is the code used for the tasks in the:

workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'

[Code]....

View 7 Replies View Related

Unhide Row Directly Below

Jan 9, 2009

I was wondering if it's possible to unhide a row directly below one that is visible?

I am creating a template for users that allows them to choose which lines (rows) they would like to use. They then hit a button to hide all the other lines they don't wish to use.

For each row that is visible I then need the row directly below it to become visible so that the user can enter associated information.

I'm stumped on how to do it. I have the user entering "a" in column A for any row they wish to keep - but I'm not sure how to incorporate this into unhiding the row below (or if I'm on the wrong track with my thinking).

View 5 Replies View Related

How To Control Many Loops Directly After Each Other

Aug 7, 2012

How I can control many loops directly after each other. For example I have this script:

If (Cells(x, column) > 35 And Cells(r, column) < 25 Then

If (cells(x, 75) = "GotU") Then
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Else

If (cells(x, 85) = "GotYah") Then
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Else

If (cells(x, 95) = "GotYou") Then
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
End if

Is this script correct if I want the loops to check all data that I write (for ex. GotYou, GotYah etc.) or do I need to end every if before next if? I want that the loops makes all 3 controls.

View 9 Replies View Related

How To Import Webpage Directly Into VBA

May 16, 2014

I've been working with this script to import and paste a webpage to a worksheet. Once the webpage is on a worksheet I can pull it into VBA easily enough but I was wondering if there's a way to "paste" the webpage directly into an array in VBA and skip the paste to worksheet step?

Code:

Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate theURL
IE.Visible = False
End With

[Code]....

View 4 Replies View Related

Insert Letters To Take You To The Name Directly

Mar 12, 2008

I have a validation box that has 371 names it using the full range of the alphabet.

Is there away within the validation box that instead of using the scroll bar that you can insert a letter or letters to take you to the name directly?

View 9 Replies View Related

Print A Userform Directly

Jun 15, 2006

I have developed an extensive program running on excell but with the user only seeing userforms. I would now like to build in a "print screen" button, but have no idea how to do this.

What it needs to do is capture the userform and all its entries (as it is displayed on the screen) and send this to the printer to be printed as a picture.
I am assuming that there must be code available so that when ever the user clicks this button, the standard windows (or excell) print screen appears from which he will be able to choose the printer etc.

View 3 Replies View Related

Why Cannot Directly Set Wrap On Range Of Cells

Jun 28, 2014

I would like to simply reference this range of cells and change one formatting attribute.

VB: Sheets("flaggedSite report").Range(Cells(RowV, 2), Cells(RowV, 6)).WrapText = True

I get a runtime error 1004 with this???

VB:
With Sheets("FlaggedSite Report").Range(Cells(RowV + 1, 2), Cells(RowV + 1, 5))
'.Range(Cells(RowV, 2), Cells(RowV, 6)).WrapText = True
.WrapText = True
End With

This one runs but gives me unpredicted results. This one I think changes the format on my original sheet vs FlaggedSite Report.

VB:
With Worksheets("FlaggedSite Report")
With Range(Cells(RowV + 1, 2), Cells(RowV + 1, 5))
.WrapText = True
End With
End With

All I want to do is with as small a code as possible make a change to an inactive sheet of my choosing to the wrap format of a range of cells.

View 3 Replies View Related

Reference To Cell Directly To The Left

Aug 10, 2009

Is there any way to refer to a cell that is directly to the left of the current cell?

I need to create a Comma-Separated Value file with the Excel formula in the CSV file. Because of this, I do not know the current cell location, but want to do something like =(Cell directly to the left of me) + (Cell two cells to the left of me)

View 2 Replies View Related

How To Show Picture From Another File Directly

Jul 2, 2013

I have an excel file with about 200 images! This increases the filesize too much. So, I want to (if possible) have all the 200 images in different files, but still show all the pictures directly in Excel like before, without having the directly imported into excel. So, easy explained: I want to show a picture directly in excel that is in another file without having the picture increasing the filesize as before! How can i do this??

View 6 Replies View Related

Get Data From Cell Directly Across Formula?

Nov 7, 2013

Lets say we have prices in column (B) and in column (F) I want to insert a formula that says:

In the same row, look at cell in column (B). If price is between 1000 and 8000 then put 2.00 if price is between 500-999 then put 0.50 if price is between 1-499 then put 0.00

I need to achieve this using something like =OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1) but I am not sure how its done.

I will be using this formula in a find and replace macro. So I can NOT make the typical drag and fill formula.

View 10 Replies View Related

Macro To Edit Directly In Cell

Jun 18, 2009

I have disabled edit directly in cell in the option menu so that when i double click it goes to source file.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved