PC Review


Reply
Thread Tools Rate Thread

auto mailing of selective range as attachment

 
 
Eddy Stan
Guest
Posts: n/a
 
      21st Jun 2008
Hi

I am trying to send automail to various persons of various departments from
finance, please help me. As it is voluminous data and repeated task. Let me
explain what I am doing
I have 2 sheets
1 detail data sheet – with autofilter ( I need to filter location code wise,
copy & paste in new work book and send as attachment to various people)
2 mailing information

Data in sheet 2 mailing information
Range a – Sl No
Range b – LocationCode
Range c – Location Name
Range d – Names (names of persons whose id is in range
Range e – To IDS
Range f - CC IDs
Range g – Instructions to type as body in each letter – customized based on
data, which I will type and keep in advance
Range h – Send / ignore – to validate before sending mail, choose to send
mail if the cell has word “Send”
Range I - after sending mail, should store as “Sent” or “Skipped” (when
range h is changed to Send from ignore then mail need to be sent)

The macro should run automatically till the end of list in sheet 2 (70
locations approx), Auto mail is checked in Outlook so I can confirm manually,
bypass that checking is not available.

Can this be automated, please answer me by monday

 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      21st Jun 2008
hi
see this site...
http://www.rondebruin.nl/sendmail.htm

Regards
FSt1

"Eddy Stan" wrote:

> Hi
>
> I am trying to send automail to various persons of various departments from
> finance, please help me. As it is voluminous data and repeated task. Let me
> explain what I am doing
> I have 2 sheets
> 1 detail data sheet – with autofilter ( I need to filter location code wise,
> copy & paste in new work book and send as attachment to various people)
> 2 mailing information
>
> Data in sheet 2 mailing information
> Range a – Sl No
> Range b – LocationCode
> Range c – Location Name
> Range d – Names (names of persons whose id is in range
> Range e – To IDS
> Range f - CC IDs
> Range g – Instructions to type as body in each letter – customized based on
> data, which I will type and keep in advance
> Range h – Send / ignore – to validate before sending mail, choose to send
> mail if the cell has word “Send”
> Range I - after sending mail, should store as “Sent” or “Skipped” (when
> range h is changed to Send from ignore then mail need to be sent)
>
> The macro should run automatically till the end of list in sheet 2 (70
> locations approx), Auto mail is checked in Outlook so I can confirm manually,
> bypass that checking is not available.
>
> Can this be automated, please answer me by monday
>

 
Reply With Quote
 
Eddy Stan
Guest
Posts: n/a
 
      21st Jun 2008
HI
CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
ANY HELP SPECIFIC

"FSt1" wrote:

> hi
> see this site...
> http://www.rondebruin.nl/sendmail.htm
>
> Regards
> FSt1
>
> "Eddy Stan" wrote:
>
> > Hi
> >
> > I am trying to send automail to various persons of various departments from
> > finance, please help me. As it is voluminous data and repeated task. Let me
> > explain what I am doing
> > I have 2 sheets
> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
> > copy & paste in new work book and send as attachment to various people)
> > 2 mailing information
> >
> > Data in sheet 2 mailing information
> > Range a – Sl No
> > Range b – LocationCode
> > Range c – Location Name
> > Range d – Names (names of persons whose id is in range
> > Range e – To IDS
> > Range f - CC IDs
> > Range g – Instructions to type as body in each letter – customized based on
> > data, which I will type and keep in advance
> > Range h – Send / ignore – to validate before sending mail, choose to send
> > mail if the cell has word “Send”
> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
> > range h is changed to Send from ignore then mail need to be sent)
> >
> > The macro should run automatically till the end of list in sheet 2 (70
> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
> > bypass that checking is not available.
> >
> > Can this be automated, please answer me by monday
> >

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      21st Jun 2008
I have a body example here
http://www.rondebruin.nl/mail/folder3/row2.htm

I can help you to change it to attachment if this is what you are looking for

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
> HI
> CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
> HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
> ANY HELP SPECIFIC
>
> "FSt1" wrote:
>
>> hi
>> see this site...
>> http://www.rondebruin.nl/sendmail.htm
>>
>> Regards
>> FSt1
>>
>> "Eddy Stan" wrote:
>>
>> > Hi
>> >
>> > I am trying to send automail to various persons of various departments from
>> > finance, please help me. As it is voluminous data and repeated task. Let me
>> > explain what I am doing
>> > I have 2 sheets
>> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
>> > copy & paste in new work book and send as attachment to various people)
>> > 2 mailing information
>> >
>> > Data in sheet 2 mailing information
>> > Range a – Sl No
>> > Range b – LocationCode
>> > Range c – Location Name
>> > Range d – Names (names of persons whose id is in range
>> > Range e – To IDS
>> > Range f - CC IDs
>> > Range g – Instructions to type as body in each letter – customized based on
>> > data, which I will type and keep in advance
>> > Range h – Send / ignore – to validate before sending mail, choose to send
>> > mail if the cell has word “Send”
>> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
>> > range h is changed to Send from ignore then mail need to be sent)
>> >
>> > The macro should run automatically till the end of list in sheet 2 (70
>> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
>> > bypass that checking is not available.
>> >
>> > Can this be automated, please answer me by monday
>> >


 
Reply With Quote
 
Eddy Stan
Guest
Posts: n/a
 
      23rd Jun 2008
Hi
I already have modified your coding to send auto mail with with 1 line
subject and now i want to attach file, the file name i will input in one
column. i need code to pick that file from default directory. I have code as
below

Sub TestFile()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range



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



On Error GoTo cleanup
For Each cell In
Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value) =
"yes" Then
Set OutMail = OutApp.CreateItem(0)



On Error Resume Next
With OutMail
.To = cell.Value
.Subject = cell.Offset(0, 3).Value
.Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine &
vbNewLine & _
cell.Offset(0, 2).Value
' "Please contact us to discuss bringing your account
up to date"
'You can add files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'Or use Display
End With

On Error GoTo 0


Set OutMail = Nothing
End If
Next cell


cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub



"Ron de Bruin" wrote:

> I have a body example here
> http://www.rondebruin.nl/mail/folder3/row2.htm
>
> I can help you to change it to attachment if this is what you are looking for
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
> > HI
> > CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
> > HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
> > ANY HELP SPECIFIC
> >
> > "FSt1" wrote:
> >
> >> hi
> >> see this site...
> >> http://www.rondebruin.nl/sendmail.htm
> >>
> >> Regards
> >> FSt1
> >>
> >> "Eddy Stan" wrote:
> >>
> >> > Hi
> >> >
> >> > I am trying to send automail to various persons of various departments from
> >> > finance, please help me. As it is voluminous data and repeated task. Let me
> >> > explain what I am doing
> >> > I have 2 sheets
> >> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
> >> > copy & paste in new work book and send as attachment to various people)
> >> > 2 mailing information
> >> >
> >> > Data in sheet 2 mailing information
> >> > Range a – Sl No
> >> > Range b – LocationCode
> >> > Range c – Location Name
> >> > Range d – Names (names of persons whose id is in range
> >> > Range e – To IDS
> >> > Range f - CC IDs
> >> > Range g – Instructions to type as body in each letter – customized based on
> >> > data, which I will type and keep in advance
> >> > Range h – Send / ignore – to validate before sending mail, choose to send
> >> > mail if the cell has word “Send”
> >> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
> >> > range h is changed to Send from ignore then mail need to be sent)
> >> >
> >> > The macro should run automatically till the end of list in sheet 2 (70
> >> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
> >> > bypass that checking is not available.
> >> >
> >> > Can this be automated, please answer me by monday
> >> >

>
>

 
Reply With Quote
 
Eddy Stan
Guest
Posts: n/a
 
      23rd Jun 2008
Hi,
My mail is going but it is not picking the attachment, can u help please
' Set rng = sh.Cells(cell.Row, 1).Range("C1:Z1")
Set rng = sh.Cells(cell.Row, 1).Range("F3:H5")
i have names of file for attaching with full path (is it necesary for full
path ?)
attachments can be 1 or 2 or 3 or even 5 max
so how should i set the above line.

thank you.

"Eddy Stan" wrote:

> Hi
> I already have modified your coding to send auto mail with with 1 line
> subject and now i want to attach file, the file name i will input in one
> column. i need code to pick that file from default directory. I have code as
> below
>
> Sub TestFile()
> Dim OutApp As Object
> Dim OutMail As Object
> Dim cell As Range
>
>
>
> Application.ScreenUpdating = False
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
>
>
>
> On Error GoTo cleanup
> For Each cell In
> Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value) =
> "yes" Then
> Set OutMail = OutApp.CreateItem(0)
>
>
>
> On Error Resume Next
> With OutMail
> .To = cell.Value
> .Subject = cell.Offset(0, 3).Value
> .Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine &
> vbNewLine & _
> cell.Offset(0, 2).Value
> ' "Please contact us to discuss bringing your account
> up to date"
> 'You can add files also like this
> '.Attachments.Add ("C:\test.txt")
> .Send 'Or use Display
> End With
>
> On Error GoTo 0
>
>
> Set OutMail = Nothing
> End If
> Next cell
>
>
> cleanup:
> Set OutApp = Nothing
> Application.ScreenUpdating = True
> End Sub
>
>
>
> "Ron de Bruin" wrote:
>
> > I have a body example here
> > http://www.rondebruin.nl/mail/folder3/row2.htm
> >
> > I can help you to change it to attachment if this is what you are looking for
> >
> > --
> >
> > Regards Ron de Bruin
> > http://www.rondebruin.nl/tips.htm
> >
> >
> > "Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
> > > HI
> > > CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
> > > HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
> > > ANY HELP SPECIFIC
> > >
> > > "FSt1" wrote:
> > >
> > >> hi
> > >> see this site...
> > >> http://www.rondebruin.nl/sendmail.htm
> > >>
> > >> Regards
> > >> FSt1
> > >>
> > >> "Eddy Stan" wrote:
> > >>
> > >> > Hi
> > >> >
> > >> > I am trying to send automail to various persons of various departments from
> > >> > finance, please help me. As it is voluminous data and repeated task. Let me
> > >> > explain what I am doing
> > >> > I have 2 sheets
> > >> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
> > >> > copy & paste in new work book and send as attachment to various people)
> > >> > 2 mailing information
> > >> >
> > >> > Data in sheet 2 mailing information
> > >> > Range a – Sl No
> > >> > Range b – LocationCode
> > >> > Range c – Location Name
> > >> > Range d – Names (names of persons whose id is in range
> > >> > Range e – To IDS
> > >> > Range f - CC IDs
> > >> > Range g – Instructions to type as body in each letter – customized based on
> > >> > data, which I will type and keep in advance
> > >> > Range h – Send / ignore – to validate before sending mail, choose to send
> > >> > mail if the cell has word “Send”
> > >> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
> > >> > range h is changed to Send from ignore then mail need to be sent)
> > >> >
> > >> > The macro should run automatically till the end of list in sheet 2 (70
> > >> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
> > >> > bypass that checking is not available.
> > >> >
> > >> > Can this be automated, please answer me by monday
> > >> >

> >
> >

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd Jun 2008
Hi Eddy

Start with this example
http://www.rondebruin.nl/mail/folder2/files.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Eddy Stan" <(E-Mail Removed)> wrote in message news:6696F797-FF95-496E-ACB7-(E-Mail Removed)...
> Hi,
> My mail is going but it is not picking the attachment, can u help please
> ' Set rng = sh.Cells(cell.Row, 1).Range("C1:Z1")
> Set rng = sh.Cells(cell.Row, 1).Range("F3:H5")
> i have names of file for attaching with full path (is it necesary for full
> path ?)
> attachments can be 1 or 2 or 3 or even 5 max
> so how should i set the above line.
>
> thank you.
>
> "Eddy Stan" wrote:
>
>> Hi
>> I already have modified your coding to send auto mail with with 1 line
>> subject and now i want to attach file, the file name i will input in one
>> column. i need code to pick that file from default directory. I have code as
>> below
>>
>> Sub TestFile()
>> Dim OutApp As Object
>> Dim OutMail As Object
>> Dim cell As Range
>>
>>
>>
>> Application.ScreenUpdating = False
>> Set OutApp = CreateObject("Outlook.Application")
>> OutApp.Session.Logon
>>
>>
>>
>> On Error GoTo cleanup
>> For Each cell In
>> Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
>> If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value) =
>> "yes" Then
>> Set OutMail = OutApp.CreateItem(0)
>>
>>
>>
>> On Error Resume Next
>> With OutMail
>> .To = cell.Value
>> .Subject = cell.Offset(0, 3).Value
>> .Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine &
>> vbNewLine & _
>> cell.Offset(0, 2).Value
>> ' "Please contact us to discuss bringing your account
>> up to date"
>> 'You can add files also like this
>> '.Attachments.Add ("C:\test.txt")
>> .Send 'Or use Display
>> End With
>>
>> On Error GoTo 0
>>
>>
>> Set OutMail = Nothing
>> End If
>> Next cell
>>
>>
>> cleanup:
>> Set OutApp = Nothing
>> Application.ScreenUpdating = True
>> End Sub
>>
>>
>>
>> "Ron de Bruin" wrote:
>>
>> > I have a body example here
>> > http://www.rondebruin.nl/mail/folder3/row2.htm
>> >
>> > I can help you to change it to attachment if this is what you are looking for
>> >
>> > --
>> >
>> > Regards Ron de Bruin
>> > http://www.rondebruin.nl/tips.htm
>> >
>> >
>> > "Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
>> > > HI
>> > > CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
>> > > HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
>> > > ANY HELP SPECIFIC
>> > >
>> > > "FSt1" wrote:
>> > >
>> > >> hi
>> > >> see this site...
>> > >> http://www.rondebruin.nl/sendmail.htm
>> > >>
>> > >> Regards
>> > >> FSt1
>> > >>
>> > >> "Eddy Stan" wrote:
>> > >>
>> > >> > Hi
>> > >> >
>> > >> > I am trying to send automail to various persons of various departments from
>> > >> > finance, please help me. As it is voluminous data and repeated task. Let me
>> > >> > explain what I am doing
>> > >> > I have 2 sheets
>> > >> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
>> > >> > copy & paste in new work book and send as attachment to various people)
>> > >> > 2 mailing information
>> > >> >
>> > >> > Data in sheet 2 mailing information
>> > >> > Range a – Sl No
>> > >> > Range b – LocationCode
>> > >> > Range c – Location Name
>> > >> > Range d – Names (names of persons whose id is in range
>> > >> > Range e – To IDS
>> > >> > Range f - CC IDs
>> > >> > Range g – Instructions to type as body in each letter – customized based on
>> > >> > data, which I will type and keep in advance
>> > >> > Range h – Send / ignore – to validate before sending mail, choose to send
>> > >> > mail if the cell has word “Send”
>> > >> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
>> > >> > range h is changed to Send from ignore then mail need to be sent)
>> > >> >
>> > >> > The macro should run automatically till the end of list in sheet 2 (70
>> > >> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
>> > >> > bypass that checking is not available.
>> > >> >
>> > >> > Can this be automated, please answer me by monday
>> > >> >
>> >
>> >


 
Reply With Quote
 
Eddy Stan
Guest
Posts: n/a
 
      23rd Jun 2008
Hi Ron,
thank you and the example worked well.
You saved lot of time.
Eddy

"Ron de Bruin" wrote:

> Hi Eddy
>
> Start with this example
> http://www.rondebruin.nl/mail/folder2/files.htm
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "Eddy Stan" <(E-Mail Removed)> wrote in message news:6696F797-FF95-496E-ACB7-(E-Mail Removed)...
> > Hi,
> > My mail is going but it is not picking the attachment, can u help please
> > ' Set rng = sh.Cells(cell.Row, 1).Range("C1:Z1")
> > Set rng = sh.Cells(cell.Row, 1).Range("F3:H5")
> > i have names of file for attaching with full path (is it necesary for full
> > path ?)
> > attachments can be 1 or 2 or 3 or even 5 max
> > so how should i set the above line.
> >
> > thank you.
> >
> > "Eddy Stan" wrote:
> >
> >> Hi
> >> I already have modified your coding to send auto mail with with 1 line
> >> subject and now i want to attach file, the file name i will input in one
> >> column. i need code to pick that file from default directory. I have code as
> >> below
> >>
> >> Sub TestFile()
> >> Dim OutApp As Object
> >> Dim OutMail As Object
> >> Dim cell As Range
> >>
> >>
> >>
> >> Application.ScreenUpdating = False
> >> Set OutApp = CreateObject("Outlook.Application")
> >> OutApp.Session.Logon
> >>
> >>
> >>
> >> On Error GoTo cleanup
> >> For Each cell In
> >> Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> >> If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value) =
> >> "yes" Then
> >> Set OutMail = OutApp.CreateItem(0)
> >>
> >>
> >>
> >> On Error Resume Next
> >> With OutMail
> >> .To = cell.Value
> >> .Subject = cell.Offset(0, 3).Value
> >> .Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine &
> >> vbNewLine & _
> >> cell.Offset(0, 2).Value
> >> ' "Please contact us to discuss bringing your account
> >> up to date"
> >> 'You can add files also like this
> >> '.Attachments.Add ("C:\test.txt")
> >> .Send 'Or use Display
> >> End With
> >>
> >> On Error GoTo 0
> >>
> >>
> >> Set OutMail = Nothing
> >> End If
> >> Next cell
> >>
> >>
> >> cleanup:
> >> Set OutApp = Nothing
> >> Application.ScreenUpdating = True
> >> End Sub
> >>
> >>
> >>
> >> "Ron de Bruin" wrote:
> >>
> >> > I have a body example here
> >> > http://www.rondebruin.nl/mail/folder3/row2.htm
> >> >
> >> > I can help you to change it to attachment if this is what you are looking for
> >> >
> >> > --
> >> >
> >> > Regards Ron de Bruin
> >> > http://www.rondebruin.nl/tips.htm
> >> >
> >> >
> >> > "Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
> >> > > HI
> >> > > CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
> >> > > HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
> >> > > ANY HELP SPECIFIC
> >> > >
> >> > > "FSt1" wrote:
> >> > >
> >> > >> hi
> >> > >> see this site...
> >> > >> http://www.rondebruin.nl/sendmail.htm
> >> > >>
> >> > >> Regards
> >> > >> FSt1
> >> > >>
> >> > >> "Eddy Stan" wrote:
> >> > >>
> >> > >> > Hi
> >> > >> >
> >> > >> > I am trying to send automail to various persons of various departments from
> >> > >> > finance, please help me. As it is voluminous data and repeated task. Let me
> >> > >> > explain what I am doing
> >> > >> > I have 2 sheets
> >> > >> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
> >> > >> > copy & paste in new work book and send as attachment to various people)
> >> > >> > 2 mailing information
> >> > >> >
> >> > >> > Data in sheet 2 mailing information
> >> > >> > Range a – Sl No
> >> > >> > Range b – LocationCode
> >> > >> > Range c – Location Name
> >> > >> > Range d – Names (names of persons whose id is in range
> >> > >> > Range e – To IDS
> >> > >> > Range f - CC IDs
> >> > >> > Range g – Instructions to type as body in each letter – customized based on
> >> > >> > data, which I will type and keep in advance
> >> > >> > Range h – Send / ignore – to validate before sending mail, choose to send
> >> > >> > mail if the cell has word “Send”
> >> > >> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
> >> > >> > range h is changed to Send from ignore then mail need to be sent)
> >> > >> >
> >> > >> > The macro should run automatically till the end of list in sheet 2 (70
> >> > >> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
> >> > >> > bypass that checking is not available.
> >> > >> >
> >> > >> > Can this be automated, please answer me by monday
> >> > >> >
> >> >
> >> >

>
>

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd Jun 2008
You are welcome

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Eddy Stan" <(E-Mail Removed)> wrote in message news:AB3A089F-8A6E-414D-A4E0-(E-Mail Removed)...
> Hi Ron,
> thank you and the example worked well.
> You saved lot of time.
> Eddy
>
> "Ron de Bruin" wrote:
>
>> Hi Eddy
>>
>> Start with this example
>> http://www.rondebruin.nl/mail/folder2/files.htm
>>
>> --
>>
>> Regards Ron de Bruin
>> http://www.rondebruin.nl/tips.htm
>>
>>
>> "Eddy Stan" <(E-Mail Removed)> wrote in message news:6696F797-FF95-496E-ACB7-(E-Mail Removed)...
>> > Hi,
>> > My mail is going but it is not picking the attachment, can u help please
>> > ' Set rng = sh.Cells(cell.Row, 1).Range("C1:Z1")
>> > Set rng = sh.Cells(cell.Row, 1).Range("F3:H5")
>> > i have names of file for attaching with full path (is it necesary for full
>> > path ?)
>> > attachments can be 1 or 2 or 3 or even 5 max
>> > so how should i set the above line.
>> >
>> > thank you.
>> >
>> > "Eddy Stan" wrote:
>> >
>> >> Hi
>> >> I already have modified your coding to send auto mail with with 1 line
>> >> subject and now i want to attach file, the file name i will input in one
>> >> column. i need code to pick that file from default directory. I have code as
>> >> below
>> >>
>> >> Sub TestFile()
>> >> Dim OutApp As Object
>> >> Dim OutMail As Object
>> >> Dim cell As Range
>> >>
>> >>
>> >>
>> >> Application.ScreenUpdating = False
>> >> Set OutApp = CreateObject("Outlook.Application")
>> >> OutApp.Session.Logon
>> >>
>> >>
>> >>
>> >> On Error GoTo cleanup
>> >> For Each cell In
>> >> Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
>> >> If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value) =
>> >> "yes" Then
>> >> Set OutMail = OutApp.CreateItem(0)
>> >>
>> >>
>> >>
>> >> On Error Resume Next
>> >> With OutMail
>> >> .To = cell.Value
>> >> .Subject = cell.Offset(0, 3).Value
>> >> .Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine &
>> >> vbNewLine & _
>> >> cell.Offset(0, 2).Value
>> >> ' "Please contact us to discuss bringing your account
>> >> up to date"
>> >> 'You can add files also like this
>> >> '.Attachments.Add ("C:\test.txt")
>> >> .Send 'Or use Display
>> >> End With
>> >>
>> >> On Error GoTo 0
>> >>
>> >>
>> >> Set OutMail = Nothing
>> >> End If
>> >> Next cell
>> >>
>> >>
>> >> cleanup:
>> >> Set OutApp = Nothing
>> >> Application.ScreenUpdating = True
>> >> End Sub
>> >>
>> >>
>> >>
>> >> "Ron de Bruin" wrote:
>> >>
>> >> > I have a body example here
>> >> > http://www.rondebruin.nl/mail/folder3/row2.htm
>> >> >
>> >> > I can help you to change it to attachment if this is what you are looking for
>> >> >
>> >> > --
>> >> >
>> >> > Regards Ron de Bruin
>> >> > http://www.rondebruin.nl/tips.htm
>> >> >
>> >> >
>> >> > "Eddy Stan" <(E-Mail Removed)> wrote in message news:C8EE7E82-6417-4881-AABC-(E-Mail Removed)...
>> >> > > HI
>> >> > > CAN I USE RANGE NAME AS CREDITNOTE INSTEAD OF A1:K50
>> >> > > HOW CAN I COPY THE RANGE TO NEW SHEET AND SAVE THAT AS AN ATTACHMENT FILE
>> >> > > ANY HELP SPECIFIC
>> >> > >
>> >> > > "FSt1" wrote:
>> >> > >
>> >> > >> hi
>> >> > >> see this site...
>> >> > >> http://www.rondebruin.nl/sendmail.htm
>> >> > >>
>> >> > >> Regards
>> >> > >> FSt1
>> >> > >>
>> >> > >> "Eddy Stan" wrote:
>> >> > >>
>> >> > >> > Hi
>> >> > >> >
>> >> > >> > I am trying to send automail to various persons of various departments from
>> >> > >> > finance, please help me. As it is voluminous data and repeated task. Let me
>> >> > >> > explain what I am doing
>> >> > >> > I have 2 sheets
>> >> > >> > 1 detail data sheet – with autofilter ( I need to filter location code wise,
>> >> > >> > copy & paste in new work book and send as attachment to various people)
>> >> > >> > 2 mailing information
>> >> > >> >
>> >> > >> > Data in sheet 2 mailing information
>> >> > >> > Range a – Sl No
>> >> > >> > Range b – LocationCode
>> >> > >> > Range c – Location Name
>> >> > >> > Range d – Names (names of persons whose id is in range
>> >> > >> > Range e – To IDS
>> >> > >> > Range f - CC IDs
>> >> > >> > Range g – Instructions to type as body in each letter – customized based on
>> >> > >> > data, which I will type and keep in advance
>> >> > >> > Range h – Send / ignore – to validate before sending mail, choose to send
>> >> > >> > mail if the cell has word “Send”
>> >> > >> > Range I - after sending mail, should store as “Sent” or “Skipped” (when
>> >> > >> > range h is changed to Send from ignore then mail need to be sent)
>> >> > >> >
>> >> > >> > The macro should run automatically till the end of list in sheet 2 (70
>> >> > >> > locations approx), Auto mail is checked in Outlook so I can confirm manually,
>> >> > >> > bypass that checking is not available.
>> >> > >> >
>> >> > >> > Can this be automated, please answer me by monday
>> >> > >> >
>> >> >
>> >> >

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selective Mailing Of Attachments jlkirk Microsoft Excel Programming 0 13th Jul 2005 07:47 PM
Selective Auto-reply =?Utf-8?B?VGVycnk=?= Microsoft Outlook Discussion 0 14th Jul 2004 08:30 AM
Selective auto text inputting rcoffey Microsoft Excel Discussion 1 15th Jun 2004 11:47 PM
Mailing an Attachment =?Utf-8?B?c2VydnVzNTY=?= Microsoft Word Document Management 1 27th Apr 2004 11:02 AM
data range - selective rows Holly Microsoft Excel Charting 1 11th Dec 2003 03:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:53 PM.