Computer Support Forum

Send excel sheet ( email) through macro with recipient and cc

Question: Send excel sheet ( email) through macro with recipient and cc

I found this code in this forum.
i want to add recipient as CC or BCC. What is the correct code for that?
Thanks in advance!

Code:
Public Sub email()

Dim SubJ, Recip As String

SubJ = "Enter your suject"
Recip = "[email protected]"


ThisWorkbook.SendMail Recip, SubJ

msgbox "Email Sent"

End Sub

Relevance 100%
Preferred Solution: Send excel sheet ( email) through macro with recipient and cc

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

Answer: Send excel sheet ( email) through macro with recipient and cc

6 more replies
Relevance 95.94%

I have read this thread http://forums.techguy.org/business-applications/775756-how-use-excel-sheet-send.html. I am looking to do the same thing but withh Outlook. What must I do differently?

"Okay - here goes... I know I have seen a few questions similar to mine but no final answers.

I am trying to send a mass email to my distributors - approx 100 of them. I have their names, log in ID's and email addresses in an excel spreadsheet.

What I am trying to do is have the email for letter pull the info from the spreadsheet, put it in the email, and send it out but personalized to each person/company.

Fro example, I need it to pull XYZ co from the list, use their email address to send it to them, insert their contact name in the "Dear so & so" part of the letter, pull their ID for the log in from excel and place into the email, and send it out personalized with each companies info.

PS - If you give me programming info like some of the other posts showed - I need to know where do I put it/enter it etc? I'm not all that knowledgeable on this stuff but need to figure out how to make it happen.

http://spreadsheetpage.com/index.php/tip/sending_personalized_email_from_excel/

Thanks for the info - that looks like exactly what I need ! Your awesome!
One more question tho ( please don't laugh me out of here)
Where do I enter the VB programming to make it happen - in Outlook?
In the email itself? In Excel?

With the workbook open in Excel, press ALT+F1... Read more

More replies
Relevance 95.94%

Okay - here goes... I know I have seen a few questions similar to mine but no final answers.

I am trying to send a mass email to my distributors - approx 100 of them. I have their names, log in ID's and email addresses in an excel spreadsheet.

What I am trying to do is have the email for letter pull the info from the spreadsheet, put it in the email, and send it out but personalized to each person/company.

Fro example, I need it to pull XYZ co from the list, use their email address to send it to them, insert their contact name in the "Dear so & so" part of the letter, pull their ID for the log in from excel and place into the email, and send it out personalized with each companies info.

PS - If you give me programming info like some of the other posts showed - I need to know where do I put it/enter it etc? I'm not all that knowledgeable on this stuff but need to figure out how to make it happen.

Thanks in advance!
irishki
 

Answer:How to use Excel Sheet to send personalized mass email

http://spreadsheetpage.com/index.php/tip/sending_personalized_email_from_excel/
 

3 more replies
Relevance 94.71%

Hi Everyone!

I need your help in sending automated email and text message, when the due date of a PO is a week away from the current date. The script should preferably run automatically every time the PC is running without the excel file necessarily open.

In the attached excel file, An email should go of to -email address (Col. E), with subject "PO (Col. A) is due on Delivery date(Col. C)", and body "Vendor (Col. D), please update your project status".

Also, the script should put a check mark on Reminder sent column (Col. G) after the mail is sent, the script should also check if the value of the cell is blank before sending email.

I have scoured the forum for similar problems, and although I found most of threads using Outlook only (my default email is Mozilla thunderbird),I am not proficient enough in VBA to modify them to my needs.

I'd really appreciate any help,

Thanks
 

Answer:Send email reminders thro Thunderbird from Excel sheet

16 more replies
Relevance 92.25%

Hi there,

I have a workbook which i would ideally like to send an automated mail when the date is within 30 days of "Todays date" .
I have found something similaar on past posts whichprints certain cells to an email but is triggered by a button press not date, but wondered if anyone could adjust it for me as my excel knowledge is very limited.
I really am struggling.

The password for the spreadsheet is Kalibratedbyme (capital K)

Best regards and many thanks!
 

Answer:macro to allow a date to send an email in excel

The content is different but why are you duplicating a post?
 

3 more replies
Relevance 91.02%

Hi:
I am very new to Excel 2007 and macros. I have a spreadsheet that I am trying to get to send an email reminder to the point of contact [ col b ] 5 days prior to the closure document due NLT date [ col m ]. I am looking for assistance in writing a macro which will accomplish this if it is possible. I have attached the spreadsheet that I referenced.
Your assistance would be greatly appreciated.
Thanks in advance.

desantisj
 

Answer:Excel 2007 Macro to Send Reminder Email

desantisj, welcome to the Forum.
There are already 3 or 4 posts on this forum that have the VBA code (Macro) that you can modify for your Workbook if you can read the code. Zack has written the code so it is a bit complicated, but it should be a case of substituting your Cell references that hold the data for the ones that others have used.
Otherwise it is a case of waiting for an Excel guru to come along and help. If none of them come along I can probably help you, but I normally work with Access.
 

2 more replies
Relevance 91.02%

I need to copy n number of rows from a sheet in my local machine to a sheet in fileserver.
My requirement is - if I select last 2 rows in the sheet in my local machine I need the rows to be copied after the first blank cell in the sheet in fileserver.
Also it would be helpful if the macro code is only in the local sheet and not in the fileserver sheet.

I am a newbie to macros pls help....
 

More replies
Relevance 91.02%

Hi,

I am trying to classify and code my inventory items in excel.
My classification sheet contains data in columns which I would like to copy to rows in another excel sheet.
Here is the sample data in ACMOTORS-ATTRIBUTES sheet:

The above sheet has to be converted to columns as in Item_Classificatios_Form sheet :

Can anybody assist me in writing a macro for the same.

Thanks,
mihaufo
 

Answer:Solved: Excel Macro to convert Rows from one sheet to columns in another sheet

8 more replies
Relevance 85.28%

We have Exchange 2007, and I want to be able to have a message sent to our users anytime someone tries to email them with a message that exceeds are message size restrictions. The sender gets a message bounced to them, but the recipient never gets a message and thus they have no idea if someone is trying to email them or not.

I've searched Google and come up blank, also the Exchange help guide is of no help. Anything would be greatly appreciated.
 

Answer:How to send email to recipient when email is bounced back to sender.

Not sure that you can do that, but if you figure something out post it up here. im interested in finding out if you're able to do that.
 

1 more replies
Relevance 84.05%

Dear Friends,

I have prepared a macro which sends email to recipients whenever a project is due or will be due. For which i have set criteria of +3 i.e. if project is due on 19-Nov-16 then excel will show alert 3 days before 19 nov.
In macro i have put plain text in body due to which there is no identification to whom it has been sent or to whom it has been addressed.

What is required, which i am unable to get it in this forum.

Expected result: i want mail body to be like this whenever macro is run:
Currently i am unable to put code for below example

Dear <Name of the person handling project>
Your Project <Name> is due on < uat due date> and needs attention.
Kindly ignore if already done and update in sheet.
Data to be captured by macro:
Project name you will get in column D i.e. description
Person handling project in column P
uat due date mentioned in column I

Please help.. thanks in advance.
Regards,
Gaurang M
 

Answer:Email to recipient with details in Mail Body using macro

Hi,
Please try the attached, see how it works for you in, note that the email will be generated as soon as you open the workbook.

Also note:

1) I am using column N to look for "Send Reminder" in order to generate the emails, this is because you have done the hard work will the formula so don't really need to dynamically change and check the dates with code.

2) If you want the emails to be sent automatically without being displayed, you can change .display with .send

Let us know how this works for you.

DataBase
 

1 more replies
Relevance 83.23%

I have encountered something like this problem before and finally got fixed, but this one has me stumped and I need some help.

This is a dell optiplex running Windows XP Pro in a business environment. One of the applications is used to generate bookeeping reports, which then can be dealt with in a variety of ways, one of which is to ship them out to a recipient via email. That function did work, but doesn't now, and here is the behaviour:
- When you hit the 'sent-to email recipient' function, it does successfully invoke Outlook Express [which is what the person uses]
- and the little freshly-minted message box pops up.
- but any move you make to put an address in the To: field fails. you get the Windows audible "goof" alert, but the little OE window is essentially a zombie
- you can't close it peacefully... can't close the bookeeping app, can't close the OE window. have to kill them with Task Manager and at least once even that didn't help, the machine would not restart or shutdown. Had to pull power

And disappointingly, windows is not generating an Event for these instances. nothing in the log related to the issue whatsoever.

There are lots of notes laying around the nerdsphere about the entire invocation process failing.... in other words, the application loses its relationship to the default Mail package, as though it had never been setup. but that is not the case here - its picking the right package, but th... Read more

More replies
Relevance 82%

Hello, I am having trouble sending to mail recipient as attachment in Excel 2002. I get two error messages. They are: Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client. I try to send again and I get this: General mail failure. Quit Microsoft Excel, restart the mail system, and try again.

Send to mail recipient works as it should, the send as attachment does not.

I made sure Outlook is the default mail client in Outlook and IE. I tried rebooting and the same errors occur. I have tried multiple excel files to no avail. The same thing happens in WORD.

Short term solution is saving the file to the hard drive and then opening Outlook and attaching the file that way.

The OS is XP and the office suite is XP/2002. Let me know if you need anything else.

Thank you - Scott
 

Answer:Excel 2002 cannot send to mail recipient as attachment

Have you run Detect and Repair from Outlook's Help menu?
If that doesn't work, try running Repair on the whole Office suite from the control panel.
 

3 more replies
Relevance 81.59%

I need to create a macro that when run accomplishes the following:

Creates a new sheet and names it the same as the value of the currently active cell in the current worksheet.

The macro should only work when Sheet1 is active, and only if the active cell is within a range in column A e.g. > A5.

If a sheet of the intended name already exists then it should display an Error Message.

The new sheet should actually be a copy of sheet 2.

Example.

Sheet 1 = 'Test List'
Sheet 2 = 'Blank Test Form'

If I enter '010' in Col A, Row 10 on sheet 1, and then run the macro (via a button) it should copy Sheet 2 into the workbook giving it a name of 'Test010'.

If poss, I'd like it to create the new sheet and place it alphabetically along the sSheet names at the bottom of the workbook!

One for XLGURU please?

Thanks
Hew

PS I am about to start a VBA course so this will help me.
 

Answer:Macro to add a new sheet in Excel

16 more replies
Relevance 81.59%

I like to send attachments by selecting the actual file then right click on it the select "send to" then "Mail recipient" then it usually opens a compose window and I just have to select the recipient and send it. I can do this on 3 out of 4 of my PCs and I dont know why the 4th one wont do this. I am running XP sp2 and in in IE under tool>programs I have outlook express selected. Although I use the Outlook version of incredimail but this is what I use on one of my other PCs and do not have any issues. On this one PC it will let me go thru the motions of selecting everything but the compose window never opens but if I open Incredimail Outlook and insert the file it will work fine. I want to know if there is anything I am missing to get this to work correctly. It wont send any type of file
 

More replies
Relevance 81.59%

I want to send a Word97 document via Groupwise5 (in Word File, send to, recipient) and it won't let me. I keep getting an error "The form required to view this message cannot be displayed. Contact your administrator." I click on OK and then I get: "Word couldn't send mail because of MAPI failure: Unspecified error."

I think we used to be able to do this when we ran Word97 on Windows 95, but since we upgraded to Win 2K we can't seem to get the send to function to work properly. Our tech support people say "As of right now we can't do this on the Win 2000 computers. It has to do with the Mapi spooler. You will just need to attach the document in Groupwise."

Does this sound right to you? Will this problem be resolved once we upgrade to Office 2K?
 

Answer:Word 97: Send To Email Recipient, Win 2000 w/ Groupwise 5

I may be barking up the wrong tree here, but I think this is to do with Microsoft's latest attempts to protect us all from virus attacks.

In Windows 2000 (and Outlook 2000 with SP2) the approach taken is a 'total clampdown' on attachments which has a number of unwanted side affects. One of these side affects is to disable the ability to Send To another mail recipient from within your applications.

If this is the problem, then upgrading to office 2000 will not solve the problem and I'm not sure what will. I have seen people with fixes for NT when Office 2000 SP2 had been installed, but not for Win 2000.

If nothing else, I hope this provdes some clarification.

Good luck.

Michael Gurner
Brainbench MVP for MS Excel
http://www.brainbench.com
 

1 more replies
Relevance 81.18%

Hi:

Friend with a problem: Whenever using Word, Excel or Adobe, and using the option to send the file as attachment, the attachment sends correctly, but any text written into the message does not display, nor does a copy of the email go to the MS Outlook "sent items".

Sorry if this seems vague, but it's all I have. When sending attachments from MS Outlook, every thing is fine. It's just when using the 'send to' option from other programs.

Anyone ever seen this?

Thanks in advance.

Max
 

Answer:Excel, Word, Adobe 'send to mail recipient' option

7 more replies
Relevance 80.77%

Hello,

I have built a small, simple Macro in Excel which simply un-protects a sheet, copies and pastes some data from another sheet, and then re-protects the sheet. However, when I run the Macro, a prompt asking for a password to un-protect the sheet is asked, which is fine, then the copy and paste happens, however, I am not asked to enter a password to re-protect the sheet.

When I exit the Macro, the sheet appears to be protected, however, simply selecting the un-protect sheet option, will un-protect it without prompting for a password. Is there something I'm missing? I wish to re-protect the sheet, where a password is required.

Code:

Sub Macro2()

Sheets("Old").Select
ActiveSheet.Unprotect
Sheets("Totals").Select
Range("A9:S400").Select
Selection.Copy
Sheets("Old").Select
Range("A9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

End Sub

Any help would be gratefully received, thanks.
 

More replies
Relevance 80.77%

I run Windows XP Pro. When I right click on a file in My Documents and select Send To>Mail Recipient, it open Windows Live Mail instead of using Outlook. I want it to use Outlook and thought I have all the settings right, ie in Internet Options. Can someone please help?
 

Answer:Solved: Send to Mail Recipient uses wrong email client

8 more replies
Relevance 79.95%

Hi can anyone help me I am using the VBA below to email a results sheet to various people,the code that I have will only allow me to email to one person at a time and I would have to change the email address in the code everytime, where you see "My Email address" is where I have to put the address that I am using. What I want to do is to put a code in is section so that it pick up an email address on my results sheet. With OutMail .To = "My email address" what can I use in thsi section so that it looks at one cell in the result sheet .CC = "" .BCC = "" .Subject = "This is Your Results" .Body = "Hi there" .Attachments.Add Dest.FullName .SendThis is the full code that I am using.Sub Mail_Range()'Working in 2000-2010 Dim Source As Range Dim Dest As Workbook Dim wb As Workbook Dim TempFilePath As String Dim TempFileName As String Dim FileExtStr As String Dim FileFormatNum As Long Dim OutApp As Object Dim OutMail As Object Set Source = Nothing On Error Resume Next Set Source = Range("B1:O50").SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Source Is Nothing Then MsgBox "The source is not a range or the sheet is protected, " & _ "please correct and try again.", vbOKOnly Exit Sub End If With Application .ScreenUpdating = False .EnableEvents = False End With Set wb = ActiveWorkbook Set Dest = Wor... Read more

Answer:Using a Macro to email a Results Sheet

HiAssuming you have a list of addresses in Sheet2 starting in Cell A1 you can insert this code ...'Getting list of recipient email addresses

lAddr = Sheets(2).Range("A" & Rows.Count).End(xlUp).Row
toList = ""

For i = 1 To lAddr
If i <> lAddr Then
toList = toList & Sheets(2).Cells(i, 1) & ";"
Else
toList = toList & Sheets(2).Cells(i, 1)
End If
Next
Place this code where the originating workbook is still active e.g. after this sequence;With Application
.ScreenUpdating = False
.EnableEvents = False
End WithThen substitute "toList" (without the quotes) where you have "My Email Address). It should look like this; With OutMail
.To = toList
.CC = ""
.BCC = ""
.Subject = "This is Your Results"
.Body = "Hi there"
.Attachments.Add Dest.FullName
.Send
End WithGive this a try (with dummy addresses) and see if you get the results you are expecting.

4 more replies
Relevance 79.95%

Hello i have little knowledge in Excel but i will explain in the most detail possible.When you load the excel workbook there is a master slide within this there is:Drop Down List of Students NamesAnd a Add Student.I have made the Drop Down list input range the columns "M" and "O"What i would like is that every-time I write a new students name and press the macro.It adds there name to the column "M" and then creates a new worksheet and titles it the student name you in-putted.Any help would be helpful as im truly stuck.

Answer:Excel Make a Macro Add a new Work Sheet

re: "And a Add Student."What is a "Add Student"?re: every-time I write a new students nameWhere are you entering the new student's name? Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

2 more replies
Relevance 79.95%

I'll try to be as descriptive as possible.

Current Status:
I have an excel file with two sheets: sheet1 and sheet2.
Column "A" will have lots of data.
Some rows in column "A" (or the first cell for that row) will have the word "Directory".

Intent:
I need to search sheet2, only in column "A", for the row that contains the word "Directory" and copy that whole row onto sheet1 in the same row. Continue doing that until it completes through all of the rows.

Example Data:

(Before)
sheet2
Row Column A Column B Column C
1 blah blah blah blah blah blah
2 blah blah blah blah blah blah
3 blah blah blah blah blah blah
4 Directory cool text huh?????
5 blah blah blah blah blah blah

sheet1
Row Column A
Row Column A Column B Column C
1 blah blah blah blah blah blah
2 blah blah blah blah blah blah
3 blah blah blah blah blah blah
4 blah blah blah blah blah blah
5 blah blah blah blah blah blah

*Action: Column "A" find "Directory" Copy Row 4 to sheet1

(After)
sheet1
Row Column A
1 blah blah blah blah blah blah
2 blah blah blah blah blah blah
3 blah blah blah blah blah blah
4 Directory cool text huh?????
5 blah blah blah blah blah blah
 

Answer:Simple Excel Macro to Copy Row from one Sheet to Another

"copy that whole row onto sheet1 in the same row"

Do you mean like this?

(make sure what you already have is "safe" before you try, obviously)

Sub test()
If ActiveSheet.Name <> "Sheet2" Then Exit Sub
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For Each Cell In Range("A1:A" & LastRow)
If InStr("Directory", Cell.Value) <> 0 Then
x = Cell.Row
Rows(x).Copy
Sheets("Sheet1").Cells(x, 1).Insert Shift:=xlDown
End If
Next Cell
Application.CutCopyMode = False
End Sub
 

1 more replies
Relevance 79.95%

Hi all, I've written a macro which connects to Database and compares almost 500 fields which are present in an XL sheet, with a value in database. I've looped through the cells and compared each value with the field.i.e.,for i=2 to numofrows select * from table1 where field1=cells(i,1);nextThis approach is taking more time. Can i use something like this ?select * from table1 where field1 between (range1 to range2);pls let me know.. Its very urgent. Thanks in advance

Answer:Excel Macro to Compare Database to Sheet

Depending on the database, the spreadsheet, and relationship thereof, it might be faster to just load the entire table into a recordset, then pair records and rows from there. You might also try selecting the columns you care about, instead of every column.

3 more replies
Relevance 79.95%

Hi,I'm trying to write a macro with below codings. Facing some difficulties, please help me to proceed further. Requirement: Need to allow the user to edit objects & format cells in a protected cell(All cells). Did the changes in "Review>protect sheet>Allow all users of this work sheet to>Format cells/Edit objects"Objective of this macro is "Multiple users will make start(A column)/end time(B column)".Not let the user to make any changes in A& B column(Both are protected).Its working fine in the first instance, Once i click start/end time "changes in "Review>protect sheet>Allow all users of this work sheet to>Format cells/Edit objects" going back to same position that users can not make any modifications.Sub Button1_Click() If Not Intersect(ActiveCell, Range("A:B")) Is Nothing Then ActiveSheet.Unprotect Password:="XXX" ActiveCell.FormulaR1C1 = Now ActiveSheet.Protect Password:="XXX" Else: MsgBox "This is not the correct cell." End IfEnd Sub

More replies
Relevance 79.95%

I am trying move data from Sheet1 to new sheets based on values in column A (a person's name). My data has an indefinite number of rows, but each row has a name in column A. I would like a new sheet for each name, and the name of the sheet to match the name in column A. The sheet should contain all rows from Sheet1 with a particular name, then sort the rows based on another column (date), sorted by earliest to latest date.

Answer:excel macro to filter and paste to sheet

My mistake...this is the first time I have used computing.net and missed the salutation and closing...Yes, I am requesting help and would be very thankful for any assistance.Thanks again!

7 more replies
Relevance 79.95%

Hi,I have a same situation in the sheet1 contain the list of Block name (total 341), and in the second sheet the addresses (total over 10000), is it possible to mark red each cell in block sheet that occurs in address sheet. but the block name should be exactly match with the word in the address.for example block name: "Chanditala"in address : 116,Chanditala,Kolkata Pin:700053 need to highlight RED if block sheet if it is present in the address(exact)

Answer:excel macro: how to find word one sheet to another

Like I said, a simple macro does the trick:
Sub RedBlock()
'Loop through Sheet1 A2:A341
For Each b_cell In Sheets(1).Range("A2:A341")
'Search Sheet2 A2:A1000 for Block
With Sheets(2).Range("A2:A10000")
Set b = .Find(b_cell, lookat:=xlPart)
'If Block is found, color Sheet1 cell Red
If Not b Is Nothing Then
Sheets(1).Range(b_cell.Address).Interior.ColorIndex = 3
End If
End With
Next
End Sub
The only issue would be if the address cell contains words like "Chanditalao" or "kChanditala". Since those words contain "Chanditala", they would be considered a match. There is an easy fix for that, but I didn't include it just to keep the code simple. If that fix is required, replace this instruction:Set b = .Find(b_cell, lookat:=xlPart)with this:Set b = .Find("," & b_cell & ",", lookat:=xlPart)That instruction ensures that the search string (the Block) contains a leading and trailing comma, just like in your address string example.Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.message edited by DerbyDad03

20 more replies
Relevance 79.95%

Hi,I'm trying to write a macro with below codings. Facing some difficulties, please help me to proceed further. Requirement: Need to allow the user to edit objects & format cells in a protected cell(All cells). Did the changes in "Review>protect sheet>Allow all users of this work sheet to>Format cells/Edit objects"Objective of this macro is "Multiple users will make start(A column)/end time(B column)".Not let the user to make any changes in A& B column(Both are protected).Its working fine in the first instance, Once i click start/end time "changes in "Review>protect sheet>Allow all users of this work sheet to>Format cells/Edit objects" going back to same position that users can not make any modifications.Sub Button1_Click() If Not Intersect(ActiveCell, Range("A:B")) Is Nothing Then ActiveSheet.Unprotect Password:="XXX" ActiveCell.FormulaR1C1 = Now ActiveSheet.Protect Password:="XXX" Else: MsgBox "This is not the correct cell." End IfEnd Sub

More replies
Relevance 79.13%
Relevance 78.72%

Ok, first of all I'm new to your site and WOW! I am incredibly impressed with the wealth of knowledge I've come across while searching through various forums! I've already found all kinds of great macros and ideas that will make my workload a lot easier. That being said, I have a problem with efficiently sorting some data and I hope one of you macro gurus can assist :)I've found several macros that do something similar to what I'm looking for, so hoping to get something a little more specific. Basically, I have some weather equipment that monitors up to 5 things in the air and then transmits data to my computer via radio, and spits out text files that I then copy into excel. It creates one text file for each thing I'm monitoring. The format is:Date (mm:dd:yy:hh:mm:ss), WhatIsMonitored, Unit#, ConcentrationSo for example if I'm using this equipment to monitor the concentration of oxygen in the air over the course of a couple minutes using just one unit (and by unit I mean the machine that is doing the monitoring), it will give me something like:09/01/2010 17:02:55,O2,U_10_O2,20.90000009/01/2010 17:03:09,O2,U_10_O2,20.90000009/01/2010 17:03:25,O2,U_10_O2,20.90000009/01/2010 17:03:40,O2,U_10_O2,20.90000009/01/2010 17:03:55,O2,U_10_O2,20.90000009/01/2010 17:04:10,O2,U_10_O2,20.90000009/01/2010 17:04:25,O2,U_10_O2,20.900000So for in this case it's not too much trouble to just copy the text into Excel, then use the "text to columns" feature to put it in columns.The problem I'... Read more

Answer:excel 2007 macro to sort data to new sheet

After you use the text to columns feature, I assume your data looks like this:
A B C D E
1 09/01/10 17:02:55 O2 U_10_O2.txt 20.9
2 09/01/10 17:03:09 O2 U_11_O2.txt 20.9
3 09/01/10 17:03:25 O2 U_11_O2.txt 20.9
4 09/01/10 17:03:40 O2 U_11_O2.txt 20.9
5 09/01/10 17:03:55 O2 U_12_O2.txt 20.9
6 09/01/10 17:04:10 O2 U_12_O2.txt 20.9
7 09/01/10 17:04:25 O2 U_13_O2.txt 20.9
This will probably need some tweaking, but it might get you started:Sub SplitSheets()
Dim ws As Worksheet
Dim lastDate, srcRw, dstRow As Integer
Dim newdate, wsName As String
'Determine last row with data
lastDate = Range("A" & Rows.Count).End(xlUp).Row
'Loop through data
For srcRw = 1 To lastDate
'Remove slashes from dates
newdate = Month(Cells(srcRw, 1)) _
& "-" & Day(Cells(srcRw, 1)) _
& "-" & Year(Cells(srcRw, 1))
'Build worksheet name
wsName = newdate & " Unit " & Mid(Cells(srcRw, 4), 3, 2)
'Create sheet if it doesn't exist
On Error Resume Next
Set ws = Sheets(wsName)
On Error GoTo 0
If ws Is Nothing Then
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = wsName
End If
'Copy row to next open row in corresponding sheet
dstRow = Sheets(wsName).Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets(1).Cells(srcRw, 1).EntireRow.Copy _
Destination:=Sheets(wsName).Cells(dstRow, 1)
Set ws = Nothing
Next
End SubClick Here Before Posting Data or ... Read more

10 more replies
Relevance 78.72%

Hello,

I am working in Excel (Hyperion essbase) where I am retreiving data from a number of sheets. I want to exclude a specific sheet in my workbook by it's sheetname (and not by countposition as I know I can use in this specific case by putting the sheet for instance last). The sheet I want to exclude is named "TOT" Here is my code that I thought would work but it still includes sheet "TOT" when running the macro:

Month = InputBox("YTD month?")
For i = 1 To Worksheets.Count
If Sheets(i).Visible And TypeName(Sheets(i)) <> "TOT" Then
Sheets(i).Select
ActiveSheet.Range("B7:C7").Value = "Y-T-D(FY09 " & Month & ")"
Columns("A:C").Select
EssMenuVRetrieve
End If
Next

Thanks!

/Daniel
 

More replies
Relevance 78.72%

What is the macro to print out an active sheet in excel? What I am wanting to do is run a report that will update info and print it out from a different sheet in the same workbook.
 

Answer:Solved: print active sheet macro in excel

Worksheets(1).PrintOut where 1 is the index number of the sheet

or

Sheets("Sheet1").PrintOut

or

ActiveSheet.PrintOut

Rollin
 

1 more replies
Relevance 78.72%

Hi.
I have an Excel workbook that contains two a sheets of information.
I have recorded a Macro that creates a third worksheet that has the same formats & formulas as the first two, but the data is blank (i.e. for a user to fill in).
Problem is that the macro is looking for a specific sheet number to add and copy to, so in VB code I have:

Sheets.Add
Sheets("Sheet3").Select

followed by various bits copied and pasted.

I need to stop the macro looking to create a specifically numbered sheet. Otherwise, if sheet 3 were deleted, the macro would stop working because the next sheet is automatically numbered sheet 4.
Also, I need to be able to use the macro more than once - i.e. I may need to add several new sheets in a session, not just one, and at the moment this means the macro works once and then fails.

Bearing in mind that I know very little about VB, what can I do?

Thanks,

-Gram-
 

Answer:Solved: Excel: Stop Macro from Specifying Sheet Number

6 more replies
Relevance 78.72%

After upgrading from Win 2K to Win XP Pro, and Office XP to Office 2003, some of my Excel macros that fetche data from Factset in a batch and create multiple sheets no longer rename the sheet tabs on one of the 3 PCs I use at work. The other PCs with the same upgrade do not have this problem.

The tabs are supposed to be renamed with the descriptive data from respective sheets. These macros were created over 4 years ago and it was the first time that it failed.

Another VB based application built by Factset in 2002 which uses Factset' s Script function to fetch data from its PA application and export the results to Excel also is having seemingly related problem.

The process is supposed to create multiple reports and export them on separate sheets in the same workbook. However, even though the reports ran through and created a big file, it ended deleting all the other sheets except the last one with a tab name "Sheet1 (x)".

What could be the possible sources for this problem and how canI get around it?

Thanks.

ftgml
 

Answer:Excel Macro no longer names sheet tabs

8 more replies
Relevance 78.72%

I'm new to macros, and struggling.
I have a daily list of stock used.
I've written a macro that will add a new sheet, auto numbered.
What I can't do is figure out how to take the totals from "Day1" and put them in the "Stock Used To Date" row on "Day2". I can write the macro to specifically copy the data from sheet "Day1" to "Day2", but what happens when I need to update "Day3"?
There must be a way to refer to the current sheet number - 1.
Here's the example:

Sub AddYesterdaysTotals()
'
' Define which sheet we are on
Sheets("DAY").Select

' AddYesterdaysTotals Macro
' Macro recorded 13/11/2007 by
'

'
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("B7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("C7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("D7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("G7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("H7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("I7").Select
ActiveCell.FormulaR1C1 = "=DAY!R[3]C"
Range("L7").Select

End Sub
Any suggestions would be very gratefully received!
Thanks,
Riebe
 

Answer:Solved: Excel Macro - how to reference previous sheet

8 more replies
Relevance 78.72%

Hi Guys,

I'm after a bit of help.

I'm working on a spreadsheet in Excel 2003, it's a sheet to monitor staff Holidays/lieu days/entitlement etc.
The basic setup is as follows:
the main sheet is 'Staff List' and each Staff member will have their own sheet (named as per their initials)

What I like to achieve is to have an 'fool proof' button (macro) to automatically insert a new sheet and insert the staff members name in cell AD2 and name the sheet using the staff members initials
and also insert a row on the 'Staff List' sheet (row 50, I will manually move it to the proper location (this macro is simply for the times I'm not in and colleagues mess up the formulas)).
Now the tricky bit is that there are a number of formulas on the 'Staff List' that would need to be copied to the new row

I have attached a test file to play around with for anyone who would like to.

Any Help/suggestions much appreciated!

regards
mad-martin
 

Answer:Solved: excel 2003 insert sheet macro

16 more replies
Relevance 78.31%

Thanks for your help - I've tried the usual settings and searched everywhere but can't find an answer to this question. Maybe I need to go into the registry?

Windows Home Premium, SP1.

I use Thunderbird as my default email client. Somehow, the default setting in Vista got changed - now when I right-click on a file and choose Send to-->Email recipient, I get an Outlook 2003 compose window, instead of a Thunderbird compose window. This drives me crazy. The computer behaves correctly (goes to Thunderbird) when I click on a "mailto:" hyperlink, however.

I've tried:
1. changing the settings in the Control Panel-->Default Programs window. There are 3 windows I've tried here with no luck.
a. "Set your default programs": I've checked to ensure that Thunderbird has all its defaults and Windows Mail and Outlook 2003 have none. I've also gone into each of these programs to make sure they're not stealing their defaults back.
b. I've gone into "Set Program Access and Defaults". In the Microsoft Windows section, Windows Mail is indicated as the default client, however there is no option to change it. In the Non-Microsoft section, the options set are "Use my current email program" and "Remove Access: Windows Mail". In this window, I am able to change the broswer, media player and Java settings, but it's not letting me change the email settings.
c. In the Custom window, under the setting Choose my defa... Read more

Answer:Right-click-->"send to email recipient" opens wrong client compose window--is there a registry value?

Did you try setting the default action under 'Control Panel', "Programs", "Default Programs" ... I can't remember exactly the sequence for Vista, but that should be right.

4 more replies
Relevance 77.9%

I hope someone can help me with some VBA code. Sheet1 has 500+ rows and 30+ columns of data, sorted by text in column G. I want to create a data input sheet to manually key in data. I need help to create a macro to cut and insert the row into Sheet1 - the first row after it finds a match in column G. Thanks
 

More replies
Relevance 77.9%

Hello,

So I am trying to figure out a macro that will allow the user to click a button and return to the last active sheet.

Basically why I need this is because I have 2 separate interfaces that have links that go to the same set of sheets. Based on what interface you are using (quick or advanced) I want the "return to home" link to go back to the interface that you were previously on.

I am imagining something like If(lastactivesheet=1,link to interface1), if (lastactivesheet=2, link to interface2) else (link to interface1)

I am not great with programming so any help would be much appreciated
 

Answer:Solved: Easy Excel Macro help, return to last active sheet

Hi,
Check this link. It may answer your question.
http://forums.techguy.org/business-applications/546347-excel-macro-previous-worksheet-easy.html
 

3 more replies
Relevance 77.9%

Hi,

I'm new to this, so any help would be appreciated.

My task is this - make checkboxes that would swoh only wanted rows and then copy any wanted rows to another sheet which has a specific design.

So I have 2 columns "Description" and "price".To each row I made 15 checkboxes with macro that should remove unwanted rows using this macro:

Sub CheckBox2_Click()
Rows("1:3").Select
If Selection.EntireRow.Hidden = False Then
Selection.EntireRow.Hidden = True
Else
Selection.EntireRow.Hidden = False
End If
Range("$A$1").Select
End Sub

And this actually works (to my surprise), but the thing is I want to make a button that would have macro which would copy only checkboxed (marked) rows to another worksheet. I tried to record macros, but that didn't work because it seems that I have to link all checkboxes to that button and only then I'll get a result. Now it copies all rows, but not the marked ones.

SO PLEASE HEEELP ME
 

Answer:macro excel 2007 that copies filtered rows to another sheet

13 more replies
Relevance 77.9%

Hi

I am using excel 2003 (version: 11.8341.8341) SP3 and created a macro to rename the active sheet:
Code:
Sub renamesheets()
Dim activesheet As String
If activesheet = "[B]Sheet01[/B]" Then
Set Sheets("[B]Sheet01[/B]").Name = "[B]qryOfficeNetForeign[/B]"
Application.ScreenUpdating = True
Else: End If
End Sub
SO the active sheetname is: Sheet01 and should be renamed to qryOfficeNetForeign.

This code is not working I am wondering why...

Thanks,
Wouter
 

Answer:Solved: macro to rename active sheet in excel 2003

You don't need the SET keyword.
Code:
If ActiveSheet.Name = "Sheet01" Then
ActiveSheet.Name = "qryOfficeNetForeign"
End If
or
Code:
If ActiveSheet.Name = "Sheet01" Then
Sheets("Sheet01").Name = "qryOfficeNetForeign"
End If

Regards,
Rollin
 

2 more replies
Relevance 77.9%

Hey everyone,

I was wondering if anybody on these forums could help me with the below task?

I run a backup program that generates email reports to a subfolder in my Outlook 2010 every 6-8 hours to tell me the status of every backup job that I have set up and have running. The email details the job name, the job start time, and the job status (running, completed successfully, failed, missed, cancelled etc).

At the moment, I sift through each and every one of these emails (I have over 100 backup jobs per day) and enter the relevant data manually into my excel spreadsheet. The spreadsheet looks like the following:

Job name Monday 1st Oct Tuesday 2nd Oct Wednesday 3rd Oct Thursday 4th Oct
Job_xxx SUCCESS SUCCESS FAILED FAILED
Job_yyy SUCCESS SUCCESS SUCCESS RUNNING
Job_zzz MISSED MISSED CANCELLED SUCCESS

What I&#8217;d like is to automate this process, so that each day, perhaps every 4 hours, a script would run that would search for certain values within each email I receive and update the excel sheet accordingly.

Example:

- Monday 1st Oct, 10am &#8211; email comes into inbox with subject/body containing &#8220;Job_xxx has started &#8220; >>>> update Excel sheet to record RUNNING under column &#8216;Monday&#8217; in row titled 'job_xxx'
- Monday 1st Oct, 1pm &#8211; email comes into inbox with subject/body containing &#8220;job_xxx completed successfully&#8221; >>>> update Excel sheet to record SUCCESS, ... Read more

More replies
Relevance 77.9%

I need a macro that will go through all the excel files in a directory and add a template file. Replace the template formula names with the filename on the template sheet (I can do this with a find/replace type options on the template sheeet inserted)

With 100's of files this will save a lot of time.

Next is to create a Master summary file that will copy/paste values from all the template sheets into one file.
 

More replies
Relevance 77.08%

Hi. I have a select range of cells with a set of code that unprotects the sheet when selected in order to allow hyperlinks to be created.

However when I select an active hyperlink in one of those cells it gives me the following error even though it works correctly:

Run-time error '9':

Subscript out of range

The code is as follows:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 13 Then
Sheets("Summary of Contracts").Unprotect Password:=""
Else
Sheets("Summary of Contracts").Protect Password:=""
End If
End Sub

I would like to ask whether this error can be avoided or whether some coding can be added to hide/remove the error message itself.

Thanks
 

Answer:MS Excel 2000 Select hyperlink on a macro enabled protected sheet

I tried this on my machine and it was caused when the sheet name wasn't 'Summary of Contracts'. Suggest you need to check the sheet name, if you don't use the sheet names then you could use sheets(1).unprotect etc. But thats not a great idea either!
 

3 more replies
Relevance 76.26%

Thanks for reading, first of all.

I am not the most savvy person when it comes to programming. I can manage my way around formulas pretty well, but when it comes to VBA and macros I am utterly lost. I believe I need a macro to do what I want, but I have no clue where to begin. I have searched forums but what I need is so complicated that I don't know where to look to find it so I thought I would ask for help.

I have a spreadsheet which tracks projects I am working on. Right now the sheet I am working on is "2013" for example. The sheet has several columns, but the only columns of significance to this macro are:

Account Name
Requested Date
Urgency
Due Date
Completed Date
Request
Receive
Complete

Account and Requested Date are currently manual entries.
Urgency is a data validation dropdown with: NORMAL, RUSH and OTHER.
Due Date is a formula which calculates a due date based on the Urgency selected. (Except Other, in which case I override the Due Date manually.)
Completed Date is also a manual entry.
The 3 stages are data validations which default to a blank cell and then have a Square Root sign (which looks like a checkmark) as the only other option.

Now that I have explained the source data, allow me to go into detail what I would like this to do.
I would like to populate the first sheet of the spreadsheet with seven lists. These lists would, ideally, tell me at what stage each project is at (by account and due date). The lists I have set up are in seven bo... Read more

More replies
Relevance 76.26%

HI

I am looking at a partial automation requirement on Excel and Outlook 2016.

I have an database of my team in excel.

their date of birth is on b2, (EG : 23rd March 1973)
their email id is on h2

today being : 23rd March 2016, i would like an automated mail to go to their id and the rest of the organisation with a Happy Birthday Message and a random Birthday Pic.

The better if the Birthday message can be different for different colleagues.

any help from any of you will be credited on the sheet with your name.
 

More replies
Relevance 75.85%

I have a word document that includes a form the user must fill in. I want to create a button that will do all of the following:
1. Update all fields
2. Attach the updated word document to an email
3. Enter an address I have stored in the macro into the To field of the email.

I have one module which does the first part:
Sub CommandButton1_Click()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

I found that if I add this to the before End Sub it attaches the updated Word document to an email:
Application.Options.SendMailAttach = True 'Or False
ActiveDocument.SendMail

However, I can't figure out how have it put a specific address into the To field of the document.

So I tried another tact. I have the email address as a hyperlink in the document, and set a bookmark at the hyperlink. Then I created a module that will go to the bookmark and open the hyperlink. However, this will not add the document as an attachment:

Sub Open_Hyperlink()
Selection.GoTo What:=wdGoToBookmark, Name:="hyperlink"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With

Selection.Range.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub

So then I found this bit of coding on the web, and tried imp... Read more

Answer:Word Macro to attach doc to email, then send address email

I found a solution, but I think it is a bit bulky. It seems to work but I'd love to know if there is a simpler solution:
Sub CommandButton1_Click()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing

ActiveDocument.Save

MsgBox "Thank you. Your order has been sent", vbOKOnly, "Thank you. Your order has been sent"
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
If Len(ActiveDocument.Path) = 0 Then 'Document has not been saved
ActiveDocument.Save 'so save it
End If
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then 'Outlook isn't running
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.To = "[email protected]"
.Subject = "Promo Order" '
.Body = "Thank you for your order"
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue
.Send
'**********************************

End With
If bStarted Then 'If the macro started Outlook, stop it again.
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
 

1 more replies
Relevance 75.85%

I need a visual basic macro for excel 2002 that will do the following:

From sheet1:ColumnA
Select rows until sheet1:columnA value does not start with REC (as the no of rows is unbalanced, sometimes 7 rows, sometimes 10 rows, sometimes 8 rows, etc)
copy selected rows and transpose to sheet2:columnA to however many rows were selected

Repeat until end last row
My real table has 30000 rows and the rows are unbalanced

I am attaching a test file.

Please help me and thank you for your support and time.

Tech Support Guy System Info Utility version 1.0.0.2
OS Version: Microsoft Windows XP Professional, Service Pack 3, 32 bit
Processor: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz, x86 Family 6 Model 23 Stepping 10
Processor Count: 2
RAM: 2047 Mb
Graphics Card: ATI Radeon HD 4300/4500 Series, 1024 Mb
Hard Drives: F: Total - 99998 MB, Free - 30856 MB; G: Total - 205236 MB, Free - 153405 MB; H: Total - 305168 MB, Free - 180367 MB;
Motherboard: MICRO-STAR INTERNATIONAL CO.,LTD, G31M3-L V2(MS-7529)
Antivirus: None
 

Answer:Visual Basic Macro for Excel 2002 columns to rows in new sheet using unbalanced data

Can you also attach a second workbook showing how the data should appear after the macro is run?

Regards,
Rollin
 

3 more replies
Relevance 73.39%

Hello all,I have used Excel for years, and run macros, but never written one myself. I have a spreadsheet of archived items that I need to review on a weekly basis to ensure boxes get sent back in a timely manner.The relevant columns are:Box number (an 8 digit number)Date recalledRecalled by (this will be a name)Date sent back (date - if not sent back, this will be empty)Review date (this will have a date 9 working days after the date the box was recalled)My ideal scenario is that I open the s/sheet each week, run my macro which will:Check the Date sent back box, if it is populated - nothing happensIf it is empty, the macro then checks the Review date box and if the present date is beyond the review date - the macro forms and email to be sent to the name in the Recalled by box stating: Subject: Box number: (it gets this from the Box number column)Please note this box was recalled on DD/MM/YY and is still in the office.Please advise if this can now be sent back - if not please respond accordingly.This is a big ask, I realise this - and I don't necessarily want someone to do this for me - I ideally want to understand how I do this, so that I can do it going forward myself.Any help would be greatly appreciated!ThanksEmily

Answer:Need Macro to Send email

I'm not an expert on macros by any means, but the few times I've done basic ones it's been okay after a bit of trial & error. There are a couple of good websites that give mini tutorials on how to create basic macros, these may be enough for your needs. Put 'writing excel macros' into Google & look at the first couple of hits. "I've always been mad, I know I've been mad, like the most of us..."

3 more replies
Relevance 72.57%

how to separate email ids in excel sheet...from name,designation,email id in one line..i want to know is there any simple method to separate emails.Without copying one by one

Answer:how to separate email ids in Excel sheet

open the list " name,designation,email " as .cvs.Excell will ask what character "seperates" the values. In your case Comma??Excell will display the values in separate columns, one row per listed line

2 more replies
Relevance 72.57%

I want to add a list of email addresses to an excel document. The email addresses are separated by commas only so when i paste them in they all end up in one cell. Help!!?!!

Answer:add email addresses to excel sheet

What your looking for is Text to ColumnsJust use Delimited, and select CommasMIKEhttp://www.skeptic.com/

2 more replies
Relevance 72.57%

I want separate email ids in excel sheet like thisI have email ids like this "[email protected]" and I want to remove last two words "au" and want like this [email protected] one I want to separate email ids by name ( Not domains example * gmail.com) for [email protected]@[email protected]@[email protected]@yahoo.comI want only " ME" email ids only [email protected]@yahoo.com

Answer:I want separate email ids in excel sheet

For your first requirement, there are a numerous solutions, depending on what the rest of your data looks like.Based strictly on your example, where there are 3 characters that you want to eliminate (.au) this will work. It simply returns three less characters than the original string, starting from the left:=LEFT(A1,LEN(A1)-3)If the part you want to strip off might contain something other than 3 characters, then we need to find the 2nd dot in the string and remove it and everything after it. This formula should work regardless of how many characters follow the 2nd dot.=LEFT(A1,FIND(".",A1,FIND(".",A1)+1)-1)For your second question, your text doesn't match your screen capture, so I don't really know what you are looking for. Your text says "I want only "ME" email ids only" but your screen capture shows [email protected] in the same column as the "me" emails.What exactly are you looking for?Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

5 more replies
Relevance 72.57%

How can I send just one sheet from a workbook of several sheets by email ? I am sure it can be done (as I have received a view of just specific cells before). This is for invoicing, where I have linked sheets showing similar date (for proforma and final invoice so they need to work together but not be sent together) I don't want to send the whole workbook/(These templates in turn will link to other workbooks)please

Answer:sending excel sheet by email

Save the specific sheet you want to send as another, different, workbook.

10 more replies
Relevance 72.57%

hi everyone,
how can make a rule in outlook that if i get an email from [email protected] then look into the email check for the words example id when you got it highlight the whole row and copy it to an excel spreadsheet?
 

More replies
Relevance 71.75%

I am using the following code to email word document (its actually a form) as attachment and to save it to my "P:/" drive. It seems working but the code will need to modify for the following reasons:
Once I am done filling out the form and hit the command button to run the macro? the document (form) actually sent to email and also saved to my "P:/" drive successfully but its over saved the master file. I need the form to be blank at all time.
Also, I want to have the files to be stamp with date and time (as a file name for the form) that going to be email and save to "p:/" drive.
I will appreciate any help. Thanks!!

The code I am using is:

Private Sub CommandButton1_Click()

Dim OL As Object

Dim EmailItem As Object

Dim Doc As Document

Application.ScreenUpdating = False

Set OL = CreateObject("Outlook.Application")

Set EmailItem = OL.CreateItem(olMailItem)

Set Doc = ActiveDocument

Doc.SaveAs

With EmailItem

.Subject = "Insert Subject Here"

.Body = "Insert message here" & vbCrLf & _

"Line 2" & vbCrLf & _

"Line 3"

.To = "[email protected]"

.Importance = olImportanceNormal 'Or olImprotanceHigh Or olImprotanceLow

.Attachments.Add Doc.FullName

.Send

End With

Application.ScreenUpdating = True

Set Doc = Nothing

Set OL = Nothing

Set EmailItem = Nothing

Flag = True

sPath = "P:\"

ActiveDocument.SaveAs FileName:=sPath & ActiveDo... Read more

More replies
Relevance 71.75%

Hey all
I am having a problem trying to send automated messages from the below excel file using the date column
all i need is the sheet to send an email alert a day before the dates mentioned in all the sheets in the workbook

Thanks in advance
 

Answer:Automatic Email using the date on the excel sheet

Hi,

See if this site helps.

http://www.rondebruin.nl/win/section1.htm
 

1 more replies
Relevance 71.75%

Hi Guys,

I have just joined this forum, I found some solutions given by Zack quite useful to me. Thank you so much.

But also need help in taking it further, as I have created a worksheet with lots of data which will have to be incorporated while sending auto email reminders to various admin officers depending on the dates, especially for Statutary payments like Telephone, Electricity etc.

If any body can help....... Please...............
 

Answer:Auto Email reminder from Excel Sheet

http://forums.techguy.org/business-applications/773873-how-make-excel-send-email.html
 

1 more replies
Relevance 71.75%

Hi all,

Newbie here just trying to see if any of you excel wizards have some help for me...

So, I have this excel spreadsheet (2007) that I'm trying to make as efficient as possible. (I have a smaller, revised version, but it's still too big to attach?) You can see the little amateurish things I added, such as linking to other sheets in the workbook and drawing data from the main data pages, etc. (everything I know about excel, I learned by googling the question and looking at forums like this...)

Anyway, the final thing I'd like to do is to be able click a button or link that will open an email that's automatically addressed to the right company and also includes the info from that company's sheet in the body of the email. An added bonus would be if the subject could change with the current month. Is this even possible? I know this is really hard to do without seeing the spreadsheet, so if anyone knows how to make the spreadsheet smaller so I can attach it, please let me know...it's still 1.01 MB and I already cut about 80% of the material out of it! Or I can email the spreadsheet separately for anyone to look at as well...

Also, I am very, very inexperienced with codes and macros, so if that is the solution (which I assume it is), please pretend you're talking to a dummy when explaining that part.

Thanks everyone, I appreciate any suggestions you have!
 

Answer:Trying to streamline my excel sheet with an email feature

6 more replies
Relevance 71.75%

Hi is there a way to send an automatic email of a workbook on a certain date?

For example workbook 1 needs to be sent at the end of every month automatically when opened.

thanks
 

Answer:sending excel sheet via email autmatically

"the end of every month"

Is that the last day or the last working day? If the latter, define "working".

The Analysis Toolpak add-in (you'd have to check if you have it installed) has some useful additional functions, such as EOMONTH.

Today (20th March), the formula:

=NETWORKDAYS(TODAY(),EOMONTH(TODAY(),0))

returns 8. That probably means that there are 8 working days left this month, including today. Of course, this month is a bad example because of Easter; NETWORKDAYS' 3rd argument "Holidays" is something you'd have to plug in.

Some very basic "workbook open" code could check the value of such as formula and act accordingly (i.e. if formula result = 1, do x-y-z). You might also need to set a flag to handle the workbook being opened > once on the "last" day.

Beyond that (or maybe even instead of), Ron de Bruin has lots of snazzy SendMail stuff.

HTH
 

2 more replies
Relevance 71.75%

Hi All

I am trying to email a worksheet (or tab) from excel 2007 (SP2) (OS W7). Using Outlook at the emailing faciliy.

Example 1 workbook with 7 work sheets, each worksheet needs to be emailed to a different person with a different message. Pretty sure it can be done with a marco but would rather just for the moment do it manually

Thanks
Martin
 

Answer:Email an excel 2007 work sheet

6 more replies
Relevance 71.75%

Hi,

I need to write a macro which has to automatically fill the data written in sheet1 to sheet3.This should happen row wise.

For example if the data entered in A3 of sheet1 then this data should automatically get entered in A7 of sheet 3 upon a button press.

Advance thanks for your replies.
Sandesh K R
 

Answer:Macro to insert data entered in one sheet to another sheet

Isn't this just a copy and paste?
You could record a macro and then edit it
 

1 more replies
Relevance 71.75%

Hi

I am looking for help on VBA to unhide a specific sheet to enable the macro to run, then once complete to rehide the sheet.

Code I have so far is as follows:

Application.ScreenUpdating = False
Sheets("IRIS_JNL_W2.1").Select
Range("A2:C500").Delete

Sheets("IRIS_JNL_W2.1").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "='W2-1'!R[9]C[3]-'W2-1'!R[9]C[4]"
Range("B1").Select
ActiveCell.FormulaR1C1 = "='W2-1'!R[9]C[1]"
Range("C1").Select
ActiveCell.FormulaR1C1 = "=""W2-1 - Jnl No.""&'W2-1'!R[9]C[-2]"
Range("A2").Select
ActiveCell.FormulaR1C1 = "='W2-1'!R[9]C[3]-'W2-1'!R[9]C[4]"
Range("B2").Select
ActiveCell.FormulaR1C1 = "='W2-1'!R[9]C[1]"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IF('W2-1'!R[9]C[-2]="""",IRIS_JNL_W2.1!R[-1]C,""W2.1 - Jnl No.""&'W2-1'!R[9]C[-2])"
Range("A2:C2").Select
Selection.AutoFill Destination:=Range("A2:C500"), Type:=xlFillDefault
Range("A2:C500").Select
Last = Cells(Rows.Count, "A").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "A").Value) = "0" Then
Cells(i, "A").EntireRow.Delete
End If
Next i
Columns("A:C").Select
Selection.Copy
Selection.PasteSpecia... Read more

Answer:Solved: Unhide sheet, to run macro, then hide sheet

to hide
worksheets ("IRIS_JNL_W2.1").Visible=False

to show
worksheets ("IRIS_JNL_W2.1").Visible=True

Peace be upon you
 

1 more replies
Relevance 71.75%

I use this VBA code in a Excel Macro to send a email. Actually i send a range of cell pasted in the mail but i can´t send the file (it´s was created in the same macro) attached.
Can you help me?

I send the code. How can i do for send the Prueba.doc file attached.

Sub Envia_CVP_LOTUS()

oldStatusBar = Application.DisplayStatusBar

Dim NSession As Object
Dim NDatabase As Object
Dim NUIWorkSpace As Object
Dim NDoc As Object
Dim NUIdoc As Object
Dim WordApp As Object
Dim WordDoc As Object
Dim EmbedObj As Object

Application.DisplayStatusBar = True
Application.StatusBar = "Creando el correo..."

Set NSession = CreateObject("Notes.NotesSession")
Set NUIWorkSpace = CreateObject("Notes.NotesUIWorkspace")
Set NDatabase = NSession.GetDatabase("", "")

If Not NDatabase.IsOpen Then
NDatabase.OpenMail
End If
'Create a new document

Set NDoc = NDatabase.CreateDocument

With NDoc
.SendTo = "[email protected]"
.CopyTo = ""
.Subject = "Previsión Marginal de GN para el " & Date + 1

'Email body text, including marker text which will be replaced by the Excel cells

.body = "Envío la previsión de máquinas Marginales de GN y Combustible Alternativo para el día de mañana." & vbNewLine & vbNewLine & "Donde CVP USD = CVP / ( Fn x Cotización U$S)" & vbNewLine & _
"**PASTE EXCEL CELLS HERE**" & vbNewLine & vbNewLine & &qu... Read more

More replies
Relevance 71.34%

Hi:
Using excel 2010
I have a master list of items,product code, and price.
I would like to be able to use a separate worksheet and be able to use a drop down menu/list to select and add individually to my worksheet.
Example, there mmight be 1000 items in my master list and I might like to select/import as such 11 items into my worksheet.
Any suggestions?
 

Answer:Solved: Importing selected rows from Excel sheet one to Excel sheet two

6 more replies
Relevance 71.34%

I have searched the net but cannot find anything specifically what I'm trying to accomplish.

I have a timesheet, of sorts, that I added buttons to move around and I would like to add a button for the user to click and it will send the Excel spreadsheet to me when they're done entering their data. I can get the email to open a new email message with the file attached but I'm stuck on getting my name in the To field, as well as a subject and body. Then I would like for it to send and display a message that the email was sent.

I am using Office 2003

Any help would be appreciated.
 

Answer:Solved: Macro to Send Email with Spreadsheet as attachment

7 more replies
Relevance 71.34%

separation into offical and personalHi,I am using Excel to main my database which contains email ids combination of official (*@company.com) and personals (*@gmail.com).i want to spate these data into as official and personal

Answer:i want separate official & personal email ids in excel sheet

Is gmail.com the only personal domain you need to be concerned with or are there yahoo, hotmail, etc. addresses also?Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

6 more replies
Relevance 71.34%

this is how I have all my data. there are more than 200 contact info. Everything is in column A and I'm trying to retrieve only the email addresses and paste them in another column. How can I separate the email address???? COMPANY NAME ADDRESS Phone: Fax: Email: [email protected] Web: www.test.comI have excell 2010

Answer:How to extract/retrieve email addresses from an excel sheet?

Enter this in B1 and drag it down as far as you need:=IF(LEFT(A1,5)="Email", RIGHT(A1,LEN(A1)-7),"")Select Column B and do a Copy...PasteSpecial...Values to eliminate the formulas and leave the text.Sort Descending to bring all of the email addresses to the top of Column B.Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

6 more replies
Relevance 71.34%

Hello Everyone,

Let me tell you about myself, I am Rajesh, working in a private organisation. I am doing my MCA post graduation. I have to do a repeated task everyday in my office, that sending an excel sheet to all my team members in TO field and two members in CC field. I use Outlook 2007 and Excel 2007. I searched the forum for similar threads they exist I think, but I couldn't get what I need. Let me explain you all what I am going to do everyday

There is a network drive in which I need to take list of sub folders available in four different folders and create four text files and I need import it in a single Excel sheet, after completing this the excel sheet must be saved as "<DD MMM YY> Archive" (Current date, month and year) and emailed to 9 team members(TO field) and 2 members(CC field). It is not necessary to create a new excel file everyday, just overwrite it with previous one.

I have found how to get data automated to excel from a network drive, that is I use batch file that runs commands to get the text files using a VBS(windows scheduler).And then get the data by using Import Data from Text option in excel, But I don't know how to make automated emailing as easy as possible with current date, month, year in excel sheet name.
I hope I am clear in my question, please ask me If I need to provide more information. Any help would be appreciated.

And I found this forum by googling for the above task, I read many posts and seen here member... Read more

More replies
Relevance 70.93%

I'm trying to run an Excel 2007 macro from Access 2007, when I get to the point where I want the macro stored in the active workbook I'm getting the following run-time error: run-time error '91' object variable or with block variable not set . It won't run the macro at all. I would greatly appreciate it if someone could help me fix my code so the macro will run. The code is listed below; step 10 is where I get the error.
Code:
Option Compare Database
Sub GetJournal_Entry_Data_transfer_to_Excel()
'Step 1: Declare your Variables
Dim MyConnect As String
Dim MyRecordset As ADODB.Recordset
Dim MyQueryDef As DAO.QueryDef
Dim MyDatabase As DAO.Database
Dim MySQL As String
Dim MyRange As String
Dim s As String


Dim Db As Database
Dim xl As Excel.Application
Set xl = CreateObject("Excel.Application")
Dim xlwkbk As Excel.Workbook
'Dim xlworkbk As Excel.Workbook
Dim xlsheet As Excel.Worksheet
Dim i As Integer


'Step 2:Declare your connection string
MyConnect = "Provider=Microsoft.ACE.OLEDB.12.0; Persist Security Info = False;Data Source= P:\FINANCE\Balance Sheet\Inventory\Project TAN\Project TAN.accdb; User ID = Admin;"

'Step 3: Build Your SQL Statement
MySQL = "Select* From [mtb-TantasticJE's]Where [mtb-TantasticJE's].[Dscrptn_Text]='Culls_Stat34'and [mtb-TantasticJE's].[Co_Code]='1381'"

'Step 4: Instantiate and specify your recordset
... Read more

Answer:Access 2007 VB code to run Excel 2007 macro in active sheet

7 more replies
Relevance 70.93%

Hello all,

Am hoping someone may be able to help me with a task I am trying to complete.

I have a work book that I need to edit on a daily basis, and I ideally want to be able to send an email to specific email address when a date is input.

I have attached a copy of the workbook for perusal.

To try and explain - rows 3 to 11 contain data that I would want to be emailed to the email address listed in column c (drop down menu). But what I want to achieve is that the email is sent as a meeting/apt for the user listed in C (from the drop down menu of email addresses). But I want that meeting/apt to be made for the date in the BOOKED TO field.

I appreciate that this may not be possible as an automated process, so if it is possible, to have a 'send mail' button configured at the end of each row to send an email to the recipient that would also help.

I have done a fair bit of searching and looking at various bits of code - but I will have to be honest and say I have no idea on how to implement the code into what I am trying to achieve.

If anyone is able to spend time looking into this for me I would be ever so grateful - appreciate all are busy!

Many thanks in advance.
 

More replies
Relevance 70.52%

Hi,

I am new to VBA in Excel. I am trying to accomplish the following:

Have the following operation triggered by having the user click a "submit" button, then
Copy the active sheet to a new workbook
Save the new workbook to the user's desktop
Email the saved file to a standard email address, but with an editable subject line
(If it is possible to skip step 3, and still do step 4, that would be acceptable.)
I would appreciate any help that can be offered. Again, I am quite new to VBA, so simpler is better.

Thanks!

MW
 

More replies
Relevance 68.88%

Hi!

One of our customers has a problem when trying to use this method.

When he right clicks a document (whether it's .pdf, .doc etc etc) and clicks "Send to", and then clicks "Send to mail...", the only thing that happens is that a empty dialog box appears, with the title "Error", and a confirmation box that says "OK".

When he then clicks "OK", nothing happens.

I played around a bit with default programs and associations, and ended up with removing the "Send to mail..." option completely.

I have tried to right click --> send to --> send to mail on my own computer, and it works flawlessly.

The user is running Windows 7 pro on a Dell Latitude E4300.
The default mail program is Lotus Notes v. 8.5, but Outlook is also installed and is associated with all e-mail options except the "mailto:" protocol and the ".mapimail" filetype. These two are associated with Lotus Notes.

The user wants to be able to send documents by using this method, and use it so Lotus Notes is the mail-program used for right click --> Send to --> Send to mail... option.

Is there any ideas around this problem? Please do not hesitate to ask about more info...

Regards...

Answer:Right click --> Send to --> Send to mail recipient

Cant help but subscribing to this thread as i cant send jpegs using this method at work, even though every thing else works ok.

Good luck.

6 more replies
Relevance 68.88%

I have an Excel model (office 2000) which has a range of cells that contain if/then statements. I'm trying to get Excel to automatically send an email if any of the cells within that specified range were to provide a value that was false. Is this possible? Thanks for any insight.
 

Answer:Email Macro in Excel??

16 more replies
Relevance 68.88%
Question: Excel Email Macro

Hi All,

I have a spreadsheet and i am needing to create a macro that will opena new message in Outlook and populate the 'To' Field with one cell and then the 'CC' field with 2 email addresses, one from one field and the other from a different field. then the subject from another field and then the body from another. it then leaves the message window open so i can check it right and hit send.

I found the script the other day but can not find it anywhere including this site.

Any help on this will be great.

JPL

Any
 

Answer:Excel Email Macro

Hi JPL,

You could use this function, just pass the values to it
Code:

Function MailData(mSubject As String, mMessage As String, Sendto As String, Optional CCto As String)
Dim eSubject As String, EBody As String
Dim app As Object, Itm As Variant
Set app = CreateObject("Outlook.Application")
Set Itm = app.CreateItem(0)

With Itm
.Subject = mSubject
.to = Sendto
If Not IsMissing(CCto) Then .CC = CCto
.Body = mMessage
' .Attachments.Add (NewFileName1) ' Must be complete path
.Display ' This property is used when you want
' .send
End With
Set app = Nothing
Set Itm = Nothing
End Function

It's from one of the posts, I do not remember which one
 

1 more replies
Relevance 68.88%

Any way of controlling the time a email is sent via a excel spread sheet using vba?
 

Answer:Excel - macro email-

6 more replies
Relevance 68.88%
Question: Excel Email Macro

Hi

I am trying to write a macro in Excel 2003 to automatically send an email using Outlook to a list of individuals asking them to confirm their personal details using the attached template. Could someone show me where I am going wrong with the script please?

Many thanks
 

Answer:Excel Email Macro

16 more replies
Relevance 68.06%

Windows 7 --------------------------------------------------------------------------------First thing...I know nothing about macros!! I do know a very little about formulasI have created "IF" formula in excel 2010, based on a date it will create a send due in column "E", =IF(D5=$A$2,HYPERLINK(mailto:"&$K$1&"?subject="&A5&-B5&"&body="&$C$3,"sendworks great but, I have to go thru 86 rows in column "E" and hit "Send Due" numorous times,then hit send again on all the emails, can we automate this some how, like a macro that engadges when I open my outlook every morning?Thank u

Answer:Need Macro to automate email from excel

I have written code in Outlook, which is essentially a template, you fill in the details, all sorts of stuff happens accordingly to what you have selected, and you press send and it will send the emails to whoever it is you want. Iv done this in Outlook, so my question is, why do you need this to be done in Excel? is Outlook acceptable?

3 more replies
Relevance 68.06%

I have a user who wants to create a macro which will automatically send an excel spreadsheet into outlook and email it.
Any suggestions welcome. Thanks.
 

More replies
Relevance 68.06%

My sense is this is a pretty simple request, but I'm completely illiterate when it comes to VB.

I have an excel spreadsheet with a number of data points. I'm looking to export the entire sheet to a CSV file and send it via Outlook. Any suggestions?
 

More replies
Relevance 68.06%

Hello all;

I am new to this forum and also to Excel macros. I have a large Excel file detailing financial accounts with my small business.
Anyway, I would like to email any customer who has an overdue balance as per column V in my attached sample file (any customer with a greater than zero value in V). I would like to send an email; something like this:

Joe Wilson;
As of 2/28/11 (latest date in the row that is on/after the current date), your account is currently overdue and you owe $1500.00 (G3).
Thank you.
Treasurer
I found several other threads explaining how to send an automatic email from Excel, but I haven't found one for sending an individualized email to a list of recipients. If this question has been answered, please feel free to redirect me. Otherwise, I'd appreciate any suggestions. Please let me know if I can detail my needs any better.
Thanks!
 

Answer:Excel Macro: Auto Email

welcome to the board.

I put some code in the sheet

The macro name is CheckAndMail

Let me know if this is what you need

PS: I just corrected something I came accross and have re attached the corrected sample
 

2 more replies
Relevance 67.65%

hello everyone,

i would like to ask for help,

i already made a macro for mac excel 2011, the macro is only move and copy an active worksheet to the last position of sheets.

however, i found something wierd, suddenly there is code inside the new sheet module. the code is

'True
End

this code makes me un able to run macro anymore, but after i remove that code, i can run again the macro.

could any one help me regarding this problem?

Thankss...

the code i was using as follow

sub test123()

activesheet.copy after:= sheets(sheets.count)

End Sub
 

Answer:un able run macro in 2011 after adding new sheet by macro

Are you sure thes isn't any code in the source sheet?
 

3 more replies
Relevance 67.24%

I would like to ask for an Excel macro which can send an automate email on a certain date every Month.

The dates would be as follows:

1st Monday: Email should be sent to [email protected] automatically
2nd Wednesday: Email should be sent to [email protected] automatically
3rd Tuesday: Email should be sent to [email protected] automatically
3rd Tuesday: Email should be sent to [email protected] automatically
3rd Tuesday: Email should be sent to [email protected] automatically

Subject line: ABC123D5679_Data transfer expected today

Details of the body of the text message:

"Dear All,
This is to remind you that we are expecting the data transfer to be posted in Novartis system today . This is just an advanced intimation.

Kindly let us know if you foresee a delay in the data transfer.

Kind regards,
Rohit"
Many thanks in advance for your help guys. This means a lot.
 

More replies
Relevance 67.24%

Hello

I need to come up with a simple outlook macro (or script?) that fires off whenever a new email meeting certain criteria is received.

1. new email is received with "please refresh quotes" in the subject
2. outlook runs a macro that causes another macro to run (the second macro is located in a excel workbook which is already running in my office pc)
3. the excel (attached) is simply refreshing market prices and emails whenever the macro is triggered. because the quotes are obtained via a DLL feed I can only get it at work.

the purpose is simply to get live market quotes on my personal email from my work email whenever i need.
thanks in advance for your help.
 

Answer:Solved: Run excel macro when new email is received

9 more replies
Relevance 67.24%

Hi - I have a list of names for a particular company where I have the first name and last name of the customer plus the email naming convention their company uses. For example the company's email naming convention is: [email protected] Is there a way I can create an Excel Macro that will automatically create the email from the available information? For example if I create three columns where one has the first name, last name and the @companyurl.com?I hope someone can help with this as it will save a lot of time!!Thank You!

Answer:Need Excel macro to creat email address out of just a name

This can be done fairly easily, but I'm not going to offer any suggestions.Since it appears that you do not work for this company, I can only assume that this will be for some sort of mass, unsolicited mailing. If your project was sponsored by the company in question, they would supply you with a distribution list and you wouldn't have to build your own.For all I know, I'm on that list of names that you have and I don't need any more unsolicited email.Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

3 more replies
Relevance 66.42%

Hi
I need help writing a macro that takes an Excel file to email.

The Excel file is a data base, I wanted the Macro to take the email from a column of the Excel file, and send out the email to all the emails in the database, if possible also adding a column of the Excel file to address the specific person.

thank you.
 

Answer:need help writing a macro that takes Excel file to email

Can you post a sample file? Please remove any sensitive data.

Rollin
 

2 more replies
Relevance 66.42%

Hi there - Using MS Access 2007.
I have a FORM with a macro that runs a query to generate ONE excel file and attaches to email using MS Out look to send out. - That Works great.

Problem: Multiple users to send email & attachment.
I would like for the macro to generate excel file (S) - based by the UID.

Can someone suggest a better way of handling this that is not time consuming?

Thanks In advance!
 

Answer:MS Access 2007 - Macro > Excel > Auto Email

Access can open Outlook and send an attachment to mutiple recipients either as a list or as individual emails.
So are the attachments all the same for the recipients?
 

1 more replies
Relevance 66.42%

Hello,

My first post, sorry to be a leech right off!

I'm trying to automate some of my day to day emails. I'd like to get a macro set up that will send an email from Excel and paste the range I select in to the body of the email. Would be great if it would send to a list of addresses listed on the page as well.

Using the attached example, I'd like the macro to take whatever range I highlight on the table, copy it to the body of an email and send it to the group of emails listed on the right side.

I'm learning excel, this would help me a lot! I'll be editing this to fit a variety of other tasks. I hope it can be flexible. Thanks in advance.

Chris
 

Answer:Macro: Email Range/Selection to group from Excel

http://www.rondebruin.nl/mail/folder3/mail4.htm

I have done the looping attached.
 

2 more replies
Relevance 66.42%

Hy guys

2nd time i am posting stuff for help, and as i was helped before i will again look forward the response.

I have a file of excel, in which i am sending emails to different candidates of admission, with scan letter placed in the same folder by name.

I want to edit this code, which could select attachment based on Column A list adjacent to the email address

I am attaching the file also pasting the code

Sub Test1()
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Office 2000-2013
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String
Dim cell As Range

Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")

On Error GoTo cleanup
For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
LCase(Cells(cell.Row, "C").Value) = "yes" Then

Set OutMail = OutApp.CreateItem(0)

strbody = "We at Graduate School of Engineering Sciences and Information Technology are extremely pleased to know that you have selected Hamdard University as preferred choice for your graduate/post-graduate Studies. " & vbNewLine & vbNewLine & _
"Hamdard University is a pioneer Higher Education Institute (HEI) of Karachi producing Masters and PhDs in the fields of Engineering, Computer Sciences, Information Technology, Energy and Environment since 19... Read more

Answer:Attachment based on cell value in a excel email macro

anybody ???
 

2 more replies
Relevance 66.01%

I'm trying to send an excel worksheet via email. I currently use Office 2003 and I'm use Windows Live Mail for my email. I have the icon in the file menu on Excel but it is grayed out and I am unable to access it. Does anyone know how to fix this?

Answer:I'm trying to send an email from Excel.

hi mom2otto,i found this for you..it may be helpful to you...rondebruin[dot]nl/sendmail[dot]htm

2 more replies
Relevance 66.01%

I'm using an Excel worksheet (2007) that has macros to populate a form that I want to email to various people. I used to do it with no problem in the 2003 version, but now I get a message that says, "Unable to Sign - If using Microsoft Publisher or InfoPath Please resend as an attachment." This error message is in a dialog box that has the label, "Send as message not supported from Microsoft Publisher or InfoPath" I wasn't aware that I was using either of those applications, just Excel and Outlook. I don't care if the message is digitally signed before sending or not, I just want to send the form out. Any ideas?
 

More replies
Relevance 66.01%

If someone with access to a excel 10 spreadsheet makes a change in it is it possible to have an email sent to my outlook email address?

Answer:I'm trying to send an email from Excel.

Yes, you can achieve this by using the 'BeforeSave' function. Open the VBA window, expand 'Microsoft Excel Objects' if it's not already, then double-click on 'ThisWorkbook.'Copy and paste the following code into the window: (Note: you will need to change the email addresses and the servername at the minimum!)Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim MailObject As Object
Dim Cconfig As Object
Dim SMTP_Config As Variant
Dim Email_Subject, Email_Send_From, Email_Send_To, Email_Body As String
Email_Subject = "User Has Saved Changes to Your WorkBook"
Email_Send_From = "[email protected]"
Email_Send_To = "[email protected]"
Email_Body = "Someone has made changes to your workbook and saved them."
Set MailObject = CreateObject("CDO.Message")
On Error GoTo debugs
Set Cconfig = CreateObject("CDO.Configuration")
Cconfig.Load -1
Set SMTP_Config = Cconfig.Fields
With SMTP_Config
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "PUTYOURSERVERNAMEHERE!"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With MailObject
Set .Configuration = Cconfig
End With
MailObject.Subject = Email_Subject
MailObject.From = Email_Send_From
MailObject.To = Email_Send_To
MailObject.TextBody = Email_Body
MailObject.send
debugs:
If Err.Description <> "" Then MsgBox Err.Description
End Sub
Law of Logic... Read more

6 more replies
Relevance 66.01%

Hi,

I need to paste data from one worksheet that is unfiltered (not hidden) onto a worksheet that is filtered. I need to paste onto visable cells only, ignoring the hidden rows. Currently, my data is being pasted onto both visible and hidden rows.

I know its possible to paste only visable data, ignoring hidden cells, but I need to do the reverse of this. Pasting non hidden data onto only visible cells. And I hope I am explaining this well.

Please do not suggest a vlookup because this would take entirely too long due to the nature of my data and this project. Also, I am not skilled enough to do code, so keep it simple...

Suggestions please?
 

Answer:Solved: Pasting in excel from unfiltered sheet to filtered sheet

6 more replies
Relevance 66.01%

I found how to send an email from an Excel Macro (http://forums.techguy.org/business-applications/1056070-solved-excel-email-outlook-code.html)

Here is the code I'm using:
Code:

Sub Email_Test()
'
' Macro11 Macro
' Keyboard Shortcut: Ctrl+r
Dim eSubject As String
Dim Sendto As String
Dim CCto As String
Dim Body As String
Dim app As Object
Dim Itm As Variant
Set app = CreateObject("Outlook.Application")
Set Itm = app.CreateItem(0)
'Populate variables

mSubject = "Excel EMail Test"
Sendto = "[EMAIL="[email protected]"][email protected][/EMAIL]"
CCto = ""
mMessage = "You have received Knowledge Document Feedback for your domain."

With Itm
.Subject = mSubject
.To = Sendto
If Not IsMissing(CCto) Then .CC = CCto
.Body = mMessage
' .Attachments.Add (NewFileName1) ' Must be complete path
.Display ' This property is used when you want
' .send
End With
Set app = Nothing
Set Itm = Nothing
End Sub
Is there a way to format the message section with bullets? How about paragraph breaks?

Name: John Doe

Date: 6/15/2012
Doc #: KM123456
Etc:
Etc:
Comments:
I'm perfictly willing to look at how-to documentation if someone can point me in the right direction.

Thanks
firstshot
 

Answer:Solved: Formatting Excel Macro Email Message Section

Hi, I haven't really looked myself but instead of bullets I generally use a dash and a tab
Paragraph as such are not possible but you have the linefeed and carriage return

example to add to your macro code before calling the mail proc
Code:

Dim mytext as string
mytext = vbnullstring
mytext = "Dear Jon Doe" & vbclrf & vbcrlf
mytext=mytext & "-" & chr(9) & "Date :" & the date variable & vbcrlf
mytext=mytext & "-" & chr(9) & "Doc #:" & the dos variable & vbcrlf
mytext = mytext & "-" & chr(9) & "Etc :" "etcetera"
mytext = mytext & vbcrlf & vbcrlf
mytext = mytext & "Sincerely yours," & vbcrlf & vbcrlf
mytext = mytext & "Jane Doe" & vbcrlf

vbcrlf can also be replaced wij Chr(10) or Chr(13)

See it this helps.

Maybe html formattingis possible but this works just as fine.
 

3 more replies