Search For File Locate User Send Mail

May 11, 2007

I need to build vb that will move threw a folder earch files this source folder will be s:dc eports there will be multiple types of files. If the file ends with .ERR and the file size is > 0.1 KB THEN take file and open it then find the user id this will be 6 didgets .. this then needs to be located(if u look at attached spreadsheet “CTR208088.ERR” and go too column “AB” you will see “FA2 INPUT BY:311752 CODE) and then take and match THIS CODE (311752) to a workbook called “cashfrontieradmin11” there will be a “user name” column ‘A” in a “input names” tab and next to it column “B” “ full name” it will then register name and attach an email to user saying they have error “processing idx file into hiport”.

It will then attach error file to email and send to appropriate user(that is written in error log ) Example file is here ..the only issue I guess is being able to read the character placing(user id) in the message file..to pick this up and map back to admin file I will attach both files

View 5 Replies


ADVERTISEMENT

Send Mail On Last Day Of Every Month If Last Day Is Saturday / Sunday Send Mail On Thursday

Mar 11, 2014

I am trying to write a macro to send mail on every Friday and also on last day of every month. If the last day of the month falls on Saturday or Sunday then the macro should mail on Friday. I have written a separate macro to send a mail. I have also written to check day(ie Monday, Tuesday etc) of today. If today is Friday or month end i can send mail. I dont know how to tell the macro to send mail on friday if the month last date is saturday or sunday.

Sub done()
Dim Dat As Date, x As Integer, y As Date, sorry As String
Dim str As String
sorry = "Today is not friday or month end. So i cannot send mails"
str = WeekdayName(Weekday(Now()))

[Code] ........

View 1 Replies View Related

VBA To Pop Up Window Requesting User To Locate A File And Transferring Data Over

Jun 18, 2012

Is there a way to do this?

a) run a code that will create a pop-up window with the question, "Can you show me where the CODEMAP.txt" file is?"

b) then the user will locate the file in a pop-up window and be able to click/select the file and there are "ok" and "cancel" buttons.

c) once the "codemap.txt" file is selected, the vba code will automatically change this file to "codemap.csv" so that it will open in excel (temporarily). This file can be placed anyway, even on the desktop because it won't be needed later. This is only temporary.

d) Then on the "codemap.csv" file, everything from sheet 1, cell b1 to cell b700 are copied and pasted to sheet two of this macro

The codemap.csv file can then be deleted

View 2 Replies View Related

Send E-mail

Jan 5, 2007

I have a spread sheet with all vehicle drivers license expiration dates. there are about 300 drivers to track.

What I am looking for is a way to have an E-mail sent to me 30 days prior to the expiration date with that persons name and date of expiration so I can forward the e-mail to his supervisor. And I need this to happen without having to open the file every day. ("Excel" itself will open daily, if that helps. )

Note: I am using me as the first person, actually this will be for our fleet manager.

I have searched Google and this board this whole week and all I can find is links to threads that are dated 2000 thru 2003 that doesn't come close to what I'm looking for.

I'm not sure if any of those links will get me started because they reference Excel 97, 98, & 2000. I am useing XP and we are set up with Outlook.

I guess what I am asking for is, does anybobdy have a link or some what of a code that will work with XP and Outlook, so maybe I can figure out what to do with this?

This is a snippet of what I have as a data base if it will help: ...

View 13 Replies View Related

Send Mail Through VBA

Nov 23, 2009

I have written a code to send e-mail with attachments. However, the mail doesn't include my standard signature.

For I = 2 To 8

Set MItem = OutApp.CreateItem(0)
With MItem
.to = wb.Sheets("Mail").Range("C" & I).Value
.Cc = wb.Sheets("Mail").Range("D" & I).Value
.Bcc = wb.Sheets("Mail").Range("E" & I).Value
.Subject = wb.Sheets("Mail").Range("F" & I).Value
.body = wb.Sheets("Mail").Range("G" & I).Value

For Each fil In fldpdf.Files
LenFilName = Len(wb.Sheets("Mail").Range("B" & I).Value)
If wb.Sheets("Mail").Range("B" & I).Value = Left(fil.Name, LenFilName) Then
MItem.Attachments.Add fldpdf & "" & fil.Name
Exit For
End If
Next fil

.display
End With
Next I

View 14 Replies View Related

Send A Mail

Dec 3, 2009

Step 1 - I have a Read Only excel template which I would fill with the required data.
Step 2 - The data in cell C8 (Text) should be taken as file name and should be Saved as file name.
Step 3 - The above saved as file should be attached to the mail to outlook. I would give the email address manually.

View 9 Replies View Related

Send Mail

Feb 15, 2007

I am using the following macro:

Sub SendActiveWorkbook()
ActiveSheet.SendMail _
Recipients:="Joeb@something.com", _
Subject:="Try Me " & Format( Date, "dd/mmm/yy")
End Sub

Is there another method I can use that will display the Email instead of just sending it?
Is there a method called DisplayMail?

View 4 Replies View Related

Send Mail To All In Range

Jul 23, 2014

I need a macro that will send a separate mail to each person in range (Data sheet), with body from Mail sheet of attached excel workbook.

For attached example it should send 5 mail, that have to be like : test mail.xlsx‎

View 14 Replies View Related

Send Mail Error

Jun 19, 2007

i use Excel 2007.............

The SendMail Method took it from OzGrid web does not work with me . It gives me an error msg : Method send mail of object workbook failed...........

Do i have to refrence 2 particular library. i use OP windos vista (windows mail)

Sub SendActiveWorkbook()
On Error Rsume Next
ActiveWorkbook.SendMail _
Recipients:="dump@ozgrid.com", _
Subject:="Try Me " & Format( Date, "dd/mmm/yy")
On Error Goto 0
End Sub

View 7 Replies View Related

Automatically Attach And Send By E-mail

Jan 16, 2009

In a generated workbook I have 2 e-mail adresses in seperate cells that I'd like the users to be able to easily send the workbook to.

One as the recipient and the other as cc.

So is it possible to either use a link or userform that takes both adresses and automatically attaches this workbook?

View 13 Replies View Related

Send Mail To Filtered People?

Feb 5, 2012

I have an excel workbook which is a result of a sports survey I conducted. It basically shows who likes which sport, what level they're at, preferred time of play, etc, and their email address.

A colleague has created a type of form (using formulas, not VBA) wherein you select your criteria (Sport, Gender, Level etc) and it displays the matching names.

What I'd like is to be able to select, via a check box or similar, 1 or more names from the list of results for that sport, click a button, and their addresses automatically open in a new Outlook mail window for the person to send a mail to those people.

View 4 Replies View Related

VBA Send Lotus Mail From Different Address

Oct 9, 2012

HTML Code:
'The procedure for executing the main task:
Sub Test2()
Dim noSession As Object, noDatabase As Object, noDocument As Object

[Code]....

However I now have a requirement to send it from my Team mailbox - which I have access to

View 1 Replies View Related

Pop Up Or Auto Send E-mail If Value Is True

Oct 7, 2009

is it possible for Excel to generate a pop-up or auto send an e-mail when a value is true? I'm wanting to be notified on a lengthy spreadsheet either by e-mail or by pop-up when an item is within 90 days of its due date.

Something like:

IF(H2-90>=TODAY,SEND E-mail/generate pop-up code,"")

View 9 Replies View Related

VBA Code To Send Mail Automatically From Outlook

Feb 28, 2014

I need to send a mail on a daily basis from outlook at 6.00 pm.

Containing a shared link to particular mail I'd.

View 10 Replies View Related

Unable To Send Mail Using CDO (remote Server)

Feb 11, 2009

I have CDO set up on in an excel workbook contained on our network. We have been using the following code for well over a year. It works flawlessly on 12 of our 13 computers. I can send mail through Excel using the following code on my computer. But not on a particular computer. The user at that particular computer can't send mail through the CDO code from her computer but can from other computers.
This problem is definitely isolated to a computer. I had tech support un-install office, use a cleaning tool, then re-install office. The problem persists. Is there a particular setting on this computer that needs to be set that I am unaware of?
Here is the code...

View 3 Replies View Related

Send Mail With Attachment Of Csv With Unique Number

Jan 13, 2010

The file which I want to send as a CSV needs to be named in a certain way. It would be the contents of cell A2, then the date it was sent and the time. Here is my current code. How can I get it to pick up data from a cell and then add it to the list. Also, the list has to be one string, so for example, 23459 Cell A2, 1310 Date and 192859 would be time. So the renamed file would be named 234591310192859. Here is my code which may make what I'm saying a bit more into a bit more sense. Currently the name which is outputted is 'Name of Spreadsheet.xls 13-Jan-10 19-31-59'.

View 6 Replies View Related

Send Mail By Click On Command Button

Sep 8, 2009

I have a command button in my excel sheet, if I or my team person clicks on it, the same file has to go to my manager's mail ID from my or my team person's (who clicks) outlook.

View 9 Replies View Related

Search Function (locate Data) Search All Sheets Within The Workbook

Sep 14, 2009

Using the search macro code below, could someone please help to add in more codes what I'm currently using, and also where to insert it. The Search function works well for what I need and it helps me to locate data. When using the search function somehow it search all sheets within the workbook but I only want it to search an array of sheets when using this macro that is needed to complete the task for what I'm after.

Macro
Public Sub FindText()
'Run from standard module, like: Module1.

Dim ws As Worksheet, Found As Range, rngNm As String
Dim myText As String, FirstAddress As String, thisLoc As String
Dim AddressStr As String, foundNum As Integer

myText = InputBox("Enter the text that you want to search for:", "Start Search!")

If myText = "" Then Exit Sub...................

View 9 Replies View Related

Timesheet: Send Out A Mail Template Everyweek To All The Department

May 23, 2006

I send out a mail template everyweek to all the dept. employees using outlook. I attach a excel sheet to the mail so the employees can type in their hours and then sent it back. Then i go in manually each sheet and copy the info in THE timesheet excel sheet and sent it to the HR. Any easy way automate this process? What id like is to send a mai lcontaining the excel sheet, the emlpoyees fill it and the data tranfers to a excel sheet...

View 2 Replies View Related

Search Word For Text And Send Values Next To Text To Excel File

Apr 30, 2009

I am using Windows XP and Office 2003.

I am looking to automate a process where information is sent to someone in a text format and they in turn transfer that data to an excel file. It basically looks like this (but includes a lot more info):

Service Request #: 123456
Instrument Type: New Instrument
Lot/Serial #: 123456
SR Type: Product Complaint
Service Coverage: Maintenance Agreement

The info on the left (text preceding the colon) is always the same but the values following the colon can change. The excel file has all of the text before the colon and they just enter the information into the cells. I am looking to make it so that an Excel macro (or maybe a word/outlook macro) automatically scans the text document and sends this info to the exact same cells in excel every time.

The text file is actually a message from an Oracle database and I am not going to be able to make any changes to the way the data comes in.

View 9 Replies View Related

Send Mail Through Outlook To Team Members For Their Pending Trainings?

Jan 5, 2014

I am using an excel where I want to send mail to my team members for their trainings pendings,

Few trainings are once in a year and few traings are monthly.

View 1 Replies View Related

VBA Send Mail With Lotus Notes Attach ONLY With Worksheet Not Workbook

Apr 22, 2013

I am using a version of the following code that sends a mail using Lotus notes and attaches the Workbook - I am wondering if there is anyway I can make it attach the WORKSHEET instead ?

Code:
'The procedure for executing the main task:
Sub SendWithLotus()
Dim noSession As Object, noDatabase As Object, noDocument As Object
Dim obAttachment As Object, EmbedObject As Object
Dim stSubject As Variant, stAttachment As String
Dim vaRecipient As Variant, vaMsg As Variant

[code]...

View 1 Replies View Related

Send Mail On Outlook Based On Number Of Days Left To Deadline?

Jun 28, 2014

I have an excel sheet with one column containing deadline dates. I want the excel sheet to take each day's date and subtract it from the deadline date. If number of days left is less than 60. Send a mail via outlook to the email against that column.

View 3 Replies View Related

Mail Merge In Word And Then Copy / Paste Into Outlook Message And Send It Out

Jul 6, 2012

I have a spreadsheet with client names, email addresses, and appointment info. I export a .csv file from outlook. I have been doing a mail merge in word and then coping and pasting into an Outlook message and sending it out. I did some reseach and found code that I have made changes to. Of course they it doesn't work. I can't get anything to happen when I run this code.

Code:
Sub Qualls_Email_Confirms()

Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range

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

[Code] .........

View 3 Replies View Related

Macro To Send Mail Via Lotus Notes Diff Recipients With Range?

May 22, 2013

Am trying for a code which will send mail to recipients mentioned in column A [to] Coulmn B [CC] & formatted range should be pasted as body of email lets say C:F. Each time formatted header should remain same is it will contain column heading. I have a code which sends mail to specified recipients mentioned in code .

Code:

Sub Send_Formatted_Range_Data() Dim oWorkSpace As Object, oUIDoc As Object Dim rnBody As Range Dim lnRetVal As Long Dim WB6 As Workbook Set WB6 = Application.Workbooks.Open("C:TESTDaily_BKG.XLS") Const stTo As String =

[Code]....

View 3 Replies View Related

Excel 2010 :: Macro To Send Email Now Fails With Runtime Error 1004 - Mail System Failure

Aug 23, 2012

I've been using a macro successfully for the last couple of years, but this morning when I went to use it, it decided to fail. I have a workbook which contains various spreadsheets. The macro that has failed performs the following tasks:

1. It copies a list of email addresss from an external workbook to a sheet in the current workbook (still works)
2. It copies the referral sheet I want to send to a new file, and saves it with an appropriate filename to an appropriate folder (still works)
3. The macro then creates an email with a standard subject line, attaches the new worksheet and emails it to each of the addresses as above (broken)

The error message is from Microsoft Visual Basic. "Run-time error '1004': Mail system failure. Check your mail installation."

I'm guessing there is a setting somewhere in Excel that has changed as part of an update.

I've been through a number of the options in the developer menu to remove any obvious restrictions (& reopened excel afterwards), but so far it hasn't resolved the problem.

For what it's worth, here is the macro code.

With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Run "PullInSheet1"
Dim oldbook As String

[Code] .......

In case you're wondering about the pullinsheet code, I'll add it below - but I probably grabbed it from this forum a couple of years ago (like some of the above) & just made some changes.

Code:
Sub PullInSheet1()
Dim AreaAddress As String
'''''' Sheet11.UsedRange.Clear
Dim ClRange As String
ClRange = "= 'L:ADMINEMPLOY SERVICES" _

[Code] ........

There are a couple of things I've wanted to do to improve the macro, but I couldn't justify the need to spend time working it out (since writing spreadsheets isn't really my job). Since it's broken at the moment, I can...

1. I'd like to create a subject line that reflects the name of the person being referred. For some reason though, anything other than text in the cell reference caused an error for me. eg, I tried using concatenate to create my subject line, but it didn't work.

2. I'd like the copied sheet to contain all of the formatting of the original sheet. Presumably there is a paste option that will do this and I just picked the wrong one.

The mailsystem we use is Groupwise 8. I couldn't find any settings in that program that have been changed, or that I could change.

I should change the extension from xls to xlsx in the code since I'm using Excel 2010 (but changing it doesn't fix the problem).

View 4 Replies View Related

Locate CSV File With Open File Msgbox And Import Columns From CSV To Worksheet

Oct 28, 2011

Actually i've downloaded Tracking report of my SPO and this report is on 4-5 csv files (1 file per week). I have to gather data from these 4 files into one Worksheet. I have to do this with command button on my worksheet; with Open file dialogue box (i want to locate the csv files).

CSV files are something like that (I need only first 4 columns):

ABCDE1Name MSISDN Date Location MapLink 2M. Younus Safi "923***550577" "2011-10-07 20:36:18" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 3M. Younus Safi "923***550577" "2011-10-07 19:36:26" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 4M. Younus Safi "923***550577" "2011-10-07 16:39:58" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 5M. Younus Safi "923***550577" "2011-10-07 15:37:23" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 6M. Younus Safi "923***550577" "2011-10-07 14:37:05" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com"

and my Worksheet is like that (With a command Button):

I want to import first 3 columns of csv file on first 3 columns on my worksheet; leave 2 columns blank and then import the 4th column... now for example i have done importing data from 1st csv file and the data is on 50 rows.. i click the command button again, locate the 2nd csv file.. do the same thing (import 1st 3 columns, 2 blank, then 4th) --from 51st Row-- and so on...

ABCDEF1NameMSISDN DatedBlankBlank Location2

3

4

5

6

7

View 4 Replies View Related

VBA Code To Search For Text In Mail Attachment In Outlook?

Nov 26, 2012

I want to search for a specific text in body of an outlook mail attachment,I am able to search for the string in the body of the mail,I also get mails with mail as an attachment i want to search for the string in the attachment as well.

View 6 Replies View Related

If Then Statement That Would Send The User To Another Page In The Workbook

Mar 3, 2007

Is it possible to have an "if then" statement that would send the user to another page in the workbook? For instance..... =IF(D12="Mobile","Sheet2!","Sheet3!"). I know this does not work but is there another function that would do it? I am very new to vba and am sure it is easy there but I do not have a good handle on it yet.

View 5 Replies View Related

Show Userform Only If Hyperlink Does Not Locate File?

Dec 26, 2013

On sheet4 is a list of dates and I named that range as UPDATES2013. Each cell in that range is a hyperlink. Sheet1 cell I3 is a data validation list with the named range UPDATES2013 as the list. When a selection from Cell I3 is made I can get it to follow they hyperlink with the code I have. The problem I am having is if there is no file found, then I would like my Userform1 to show. I have tried several different things with the code, but every time I think Im going to get it to work....it doesn't. It either wont show the Userform at all, or it shows it even if the file is found. I am currently putting the code to run the macro on the worksheet module using the worksheet_change event.

One last thing...I also have hyperlinks throughout Sheet1 that will lead to the same files as in the named range UPDATES2013 from sheet4. I need the same thing to happen if they click one of these hyperlinks instead of using the data validation list in Cell I3. Is there a way to make one code that will show Useform1 if a hyperlink is selected and the file cannot be located (whether it be by the individual cells on sheet1...or the data validation list in Cell I3)?Here is the code I am using right now.

VB:
Private Sub Worksheet_Change(ByVal Target As Range)
DoFollow2013 ActiveCell
End Sub [code]....

View 9 Replies View Related







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