Need to change VBA script

Here is my VBA script, which is using for bulk emailing to all my client from a bulk data. The result is coming as an attachment on email. But i need to change, the result should be paste in the mail body.
Kindly please help..

CODE]

Option Explicit

@

Sub Send_Row_Or_Rows_Attachment_1()

‘Working in 2000-2003

Dim OutApp As Object

Dim OutMail As Object

Dim rng As Range

Dim Ash As Worksheet

Dim Cws As Worksheet

Dim Rcount As Long

Dim Rnum As Long

Dim FilterRange As Range

Dim FieldNum As Integer

Dim mailAddress As String

Dim NewWB As Workbook

Dim TempFilePath As String

Dim TempFileName As String

Dim FileExtStr As String

Dim FileFormatNum As Long

@

On Error GoTo cleanup

Set OutApp = CreateObject(“Outlook.Application”)

@

With Application

.EnableEvents = False

.ScreenUpdating = False

End With

@

‘Set filter sheet, you can also use Sheets(“MySheet”)

Set Ash = ActiveSheet

@

‘Set filter range and filter column (column with names)

Set FilterRange = Ash.Range(“A17:FA” & Ash.Rows.Count)

FieldNum = 1 ‘Filter column = A because the filter range start in column A

@

‘Add a worksheet for the unique list and copy the unique list in A1

Set Cws = Worksheets.Add

FilterRange.Columns(FieldNum).AdvancedFilter _

Action:=xlFilterCopy, _

CopyToRange:=Cws.Range(“A1″), _

CriteriaRange:=””, Unique:=True

@

‘Count of the unique values + the header cell

Rcount = Application.WorksheetFunction.CountA(Cws.Columns(1))

@

‘If there are unique values start the loop

If Rcount >= 2 Then

For Rnum = 2 To Rcount

@

‘Look for the mail address in the MailInfo worksheet

mailAddress = “”

On Error Resume Next

mailAddress = Application.WorksheetFunction. _

VLookup(Cws.Cells(Rnum, 1).Value, _

Worksheets(“Mailinfo”).Range(“A1:B” & _

Worksheets(“Mailinfo”).Rows.Count), 2, False)

On Error GoTo 0

@

If mailAddress “” Then

@

‘Filter the FilterRange on the FieldNum column

FilterRange.AutoFilter Field:=FieldNum, _

Criteria1:=Cws.Cells(Rnum, 1).Value

@

‘Copy the visible data in a new workbook

With Ash.AutoFilter.Range

On Error Resume Next

Set rng = .SpecialCells(xlCellTypeVisible)

On Error GoTo 0

End With

@

Set NewWB = Workbooks.Add(xlWBATWorksheet)

@

rng.Copy

With NewWB.Sheets(1)

.Cells(1).PasteSpecial Paste:=8

.Cells(1).PasteSpecial Paste:=xlPasteValues

.Cells(1).PasteSpecial Paste:=xlPasteFormats

.Cells(1).Select

Application.CutCopyMode = False

End With

@

‘Create a file name

TempFilePath = Environ$(“temp”) & “”

TempFileName = “” & Ash.Parent.Name

If Val(Application.Version) < 12 Then

'You use Excel 2000-2003

FileExtStr = ".xls": FileFormatNum = -4143

Else

'You use Excel 2000-2003

FileExtStr = ".xlsx": FileFormatNum = 51

End If

@

'Save, Mail, Close and Delete the file

Set OutMail = OutApp.CreateItem(0)

@

With NewWB

.SaveAs TempFilePath & TempFileName _

& FileExtStr, FileFormat:=FileFormatNum

On Error Resume Next

With OutMail

.to = mailAddress

.Subject = "NON UAO OUTLETS – AS ON 27TH MARCH 2018"

.Attachments.Add NewWB.FullName

.Body = "Hi," & vbCrLf & vbNewLine & "Please find attached Non UAO ols." & vbCrLf & vbNewLine & " " & vbCrLf & vbNewLine & "Regards," & vbCrLf & "FASIL"

.Send

End With

On Error GoTo 0

.Close savechanges:=False

End With

@

Set OutMail = Nothing

Kill TempFilePath & TempFileName & FileExtStr

End If

@

'Close AutoFilter

Ash.AutoFilterMode = False

@

Next Rnum

End If

By: Fasil

3,626 thoughts on “Need to change VBA script

  1. דירה דיסקרטיות

    We’re having coffee at Nylon Coffee Roasters on Everton Park in Singapore.
    I’m having black coffee, he’s possessing
    a cappuccino. They are handsome. Brown hair slicked back, glasses
    that are great for his face, hazel eyes and the prettiest lips I’ve seen. They’re nice,
    with incredible arms including a chest that stands out about this sweater.
    We’re standing in the front of each other discussing our lives, what we really wish for for future years,
    what we’re looking for on another person. He starts telling
    me that she has been rejected many times.

    ‘Why Andrew? You’re so handsome. I’d never reject you ‘, I have faith that
    He smiles at me, biting his lip.

    ‘Oh, I don’t know. Everything happens for good reason right.
    But let me know, you would not reject me, does one Ana?’ He said.

    ‘No, how could I?’ , I replied

    “So, would you mind if I kissed you at this time?’ he was quoted saying as I am nearer to him and kiss him.

    ‘When don’t ask, simply do it.’ I reply.

    ‘I enjoy the way you think.’ , he said.

    For the time being, I start scrubbing my high heel in the leg, massaging it slowly. ‘Exactly what do you like in females? And, Andrew, don’t spare me the details.’ I ask.

    ‘I love determined women. Someone discussion what they have to want. A person that won’t say yes just because I said yes. Someone who’s unafraid when you attempt something mroe challenging,’ he says. ‘I’m never afraid when attemping something mroe challenging, especially when it comes to making something mroe challenging in the bedroom ‘, I intimate ‘And I love women who are direct, who cut from the chase, like you simply did. To generally be
    honest, what a huge turn on.

  2. https://genolyze.com/

    Oh my goodness! Awesome article dude! Thank you so much, However I am going through problems with your RSS. I don’t understand the reason why I can’t subscribe to it. Is there anybody else getting the same RSS problems? Anyone that knows the solution will you kindly respond? Thanks!!

  3. wigs for women

    wigs for women
    I had about 2 weeks to finish this project before comic con. It involved a lot of googling, Pinterest, Youtube search, and of course,
    sleepless nights a couple hours each night for 6 7 days.
    But I did enjoy the process, somewhat like baking therapeutic when I worked on it late at night alone
    a little me time.

    clip in extensions If that not enough, what are you doing to
    stand out from the average game, and does that differentiator resonate with your audience?
    That is, you may like story and characters, but what the market
    for that in 2D side scrollers without jumping? Do surveys,
    focus groups, research other titles, whatever you need.

    Make sure that there is a market for the game you making if you intend on selling it.

    When people say you should start marketing on the first day of development,
    it these kinds of questions that are paramount.
    clip in extensions

    U Tip Extensions Then double it and cut several strands of raffia.
    And I mean several. For my waist long wig, I used two balls of raffia, the size of a fist..
    It involves transplanting hair from the permanent zone at the back of the scalp to the areas affected.
    The donor tissue which is removed in one piece is to ensure that the follicular units which are relocated behind the scalp are not
    damaged. An important part of follicular unit transplantation is single strip harvesting which guarantees protection of the individual hair follicles..

    U Tip Extensions

    tape in extensions During the finale of Season 3, Cookie
    and her family are together once again at the Laviticus nightclub in Las Vegas,
    where Jamal performs ‘When Cookie Met Lucious’. Lucious is
    then involved in a car explosion, giving him amnesia and causing
    him to forget his ex wife and family. In Season 4,
    Cookies head the Empire business while Lucious is receiving ‘help’ from
    Nurse Claudia after the devastating explosion. tape in extensions

    I Tip extensions The Eighth Doctor debuts in the TV film Doctor Who.
    While transporting the remains of his longtime nemesis the Master to Gallifrey, the
    Seventh Doctor (Sylvester McCoy) is caught in the crossfire of a gang shoot out in 1999 San Francisco’s Chinatown,
    USA. He is taken to a hospital where surgeons, confused by his double heartbeat, attempt to correct a non existent fibrillation. I Tip extensions

    cheap wigs But be sure to draw the circle with a large compass, since
    you’ll need to know the exact center later on. For dry fit, put
    the narrow end (smaller) disc down on a laminated surface, (you can use whatever surface, but dried wood glue comes off of laminate easily) on top of a 1/4″ spacer. We want disks to be in set in the ends a little bit so that we can cleanly trim the drum to final length on the lathe, and the 1/4″ spacer accomplishes that.

    cheap wigs

    hair extensions There is no evidence of intention to teach a large moral theory outside of that one particular
    case. It is like looking at a single law in a counties criminal code and
    coming to the conclusion that all laws should follow that
    particular punishment scheme. You read a law about the appropriate punishment for somebody committing a traffic violation and
    you extrapolate that all punishments should be small
    fines.If, on the other hand, your point was that people ought to interoperate the passage as one offering a large moral lesson about the limits of retribution, you free to do that,
    but the context does not support it if you aim
    is fidelity.. hair extensions

    Lace Wigs I can even shave in the shower now and save a ton of time with the
    little mirror installed inside. This is great for couples, roommates, and above
    all, college kids in a dorm or sharing a bathroom. I would have loved to
    have this when I was in college!” CGNC. Lace Wigs

    full lace wigs You may notice a larger amount of hair caught in your brush or larger amounts in the shower’s drain. You may also simply catch heaps of hairs when you pass your hand through your locks. When the hair loss takes over a long period of time you’ll often hear many long hair people say something like : “I used to remember my ponytail was big and thick, and now it’s almost the diameter of a pencil!” But is hair loss in long haired women (and men too!) really so dramatic or is there some sort of illusion caused by the length of the hair? Let’s look at some dynamics that may be taking place.. full lace wigs

    hair extensions My LO is only 4 months and I hope to keep the same with her. I definitely don see myself as the bribing type and never used bribes when I used to work with children. I do see many younger adults these days that still expect bribes in their adult lives. hair extensions

    costume wigs All were goveerned by an heri tep a’a, a “great overlord,” a hereditary title roughly equivlant to prince or count. They were responsible for military levies demanded by the kings and for taxes and tributes assessed for their regions. Each had a capital city and a cult center dedicated to the god of the territory.. costume wigs

    wigs for women Born the first of two children to Gloria Johnson[9], a surgical technician, Johnson was raised in a middle class family in Buffalo, New York. During her youth, Johnson was a champion swimmer and aspired to be a lawyer.[4] Johnson attended Bennett High School[10], graduating in 1969.[1] After high school, Johnson went on to study criminal justice at Northeastern University. While in college, Johnson tried modeling[11] while on summer break in 1971.[4] She quickly landed an assignment with Glamour and began working steadily.[11] She went on to appear on more than 500 magazine covers, including the August 1974 issue of Vogue, becoming the magazine’s first African American cover model.[4] Her appearance on the cover changed the beauty ideal in US fashion, and by 1975, every major American fashion designer had begun using African American models.[12]. wigs for women

    full lace wigs Truth be told, not everyone develops bad habits such as eating disorders and bad sportsmanship, or at least don’t pursue it. Former Miss Michigan Kirsten Haglund developed an eating disorder at the age of 15 because of the demands to stay thin. She was in denial at first, but after she had received help, she overcame her obsession and now visits high schools to talk about eating disorders. full lace wigs

    U Tip Extensions Danny desired reset remains elusive, thanks to a realization that promises to forever change Mindy. “Danny was the initiator and the ender of the relationship, and that is something Mindy picks up on and does
    not like,” Kaling revealed. “This is a very proactive character
    and that a very frustrating thing for her, so moving forward, Danny pays a price for pulling her out of this great relationship with
    Cliff [Glenn Howerton] only to, one month later, break up
    with her. U Tip Extensions

    cheap wigs human hair I live somewhere that it cold and rainy right now.

    But on those sunny days my kid is out there with his father playing.
    He lives for the days he can drive his little car to the park.

    I think having Surgical against Affinity is a bad idea.

    The only consistency they have is Thoughtcast and Bomat
    Courier, neither of which see much play. They also have few payoff cards,
    especially ones that are still relevant through
    Bridge. cheap wigs human hair

    cheap wigs Step 4: Check concrete pad on which condenser rests to make sure it’s level.
    Set carpenters’ level front to back and side to side on top
    of unit. If pad has settled, lift pad with pry bar or piece of 2 x 4,
    then force gravel or rocks under concrete to level it cheap wigs.

  4. tokoonline88.com

    Hello! I could have sworn I’ve been to your blog before but after looking at a few of the posts I realized it’s new to me. Regardless, I’m definitely pleased I discovered it and I’ll be bookmarking it and checking back regularly!

  5. harga-jual.com

    When I initially left a comment I seem to have clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I get four emails with the same comment. There has to be an easy method you can remove me from that service? Many thanks!

  6. udfauzi

    Everything is very open with a precise explanation of the challenges. It was truly informative. Your site is very useful. Thank you for sharing!

  7. 谷歌优化

    Hmm is anyone else having problems with the pictures on this
    blog loading? I’m trying to determine if its a problem on my
    end or if it’s the blog. Any feedback would be greatly appreciated.

  8. camping

    A motivating discussion is definitely worth comment. I think that you ought to write more on this subject, it might not be a taboo matter but typically people do not talk about these issues. To the next! Many thanks!!

  9. moedah.com

    Aw, this was an extremely nice post. Taking a few minutes and actual effort to produce a top notch article… but what can I say… I procrastinate a lot and don’t manage to get nearly anything done.

  10. vivoslot.com

    Hello there! I could have sworn I’ve been to this web site before but after looking at a few of the posts I realized it’s new to me. Regardless, I’m certainly pleased I discovered it and I’ll be book-marking it and checking back often!

  11. download visoslot

    Good post. I learn something totally new and challenging on sites I stumbleupon everyday. It’s always useful to read through content from other authors and use a little something from their websites.

  12. vivo slot

    An impressive share! I have just forwarded this onto a colleague who has been conducting a little homework on this. And he actually bought me lunch because I found it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending time to discuss this issue here on your blog.

  13. login vivoslot

    I must thank you for the efforts you have put in penning this website. I am hoping to see the same high-grade content by you later on as well. In fact, your creative writing abilities has inspired me to get my own, personal blog now 😉

  14. Sewa Bus Pariwisata

    My spouse and am adore your blog and get the vast majority of your post’s to be able to be precisely what I’m searching for. can you present guest writers to compose content for you? We wouldn’t mind producing some sort of post or elaborating about some the subjects jots down concerning here. Once more, awesome weblog!

  15. togel sd

    After looking over a handful of the blog posts on your website, I really like your technique of blogging. I bookmarked it to my bookmark site list and will be checking back in the near future. Take a look at my web site too and let me know what you think.

Comments are closed.