how to formula macros in excel to make email replies?

example:
I will send a reply by pressing a button in excel. such emails include with the origin email.

how to code a macro to create a reply email? not creating a new email.?

Sub EmailClearNotClear()
Dim OutApp As Object
Dim OutMail As Object
Dim To1 As String
Dim c1 As String
Dim area1 As String
Dim wk1 As String
Dim hari As String
Dim dari As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

ActiveWorkbook.Save

On Error Resume Next
To1 = Range("b41").Value
c1 = Range("c41").Value
area1 = Range("c26").Value
wk1 = Range("c28").Value
hari = Range("c27").Value
dari = Application.UserName

With OutMail
        .To = To1
        .CC = c1
        .Subject = "Informasi Stock Clear Area " & area1 & " " & wk1
        .htmlBody = "<font face = calibri light ><font size = 3> " & "Dear Bapak/Ibu,<br><br>Berikut informasi Stock Clear Area " & area1 & " periode " & "<b>" & hari & "</b>" & "<br><br><br><br><b><span style='background:yellow;mso-highlight:yellow'> Untuk all area not clear / Belum info,</b></span> mohon re-submit dashboard jika stock sudah clear.<br><br>Terima kasih.<br><br>Best Regards,<br>" & dari & "</font>"
        .display
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
   
    Application.DisplayAlerts = False
End Sub



the above code is to create a new email. what I'm asking is how does the code to create email replies from previous emails?
C--Users-anurdian1-AppData-Local-My-.JPG
Rio SadewaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_beeDirector of Information TechnologyCommented:
Sample code/data

Can you supply an excel file with some sample to outline what you are looking to fully accomplish?  Your question is not that clear.
Rio SadewaAuthor Commented:
I want reply an email by macro excel...





I will forward the previous email from an email subject using a button
Rio SadewaAuthor Commented:
example:
I will send a reply by pressing a button in excel. such emails include with the origin email.

how to code a macro to create a reply email? not creating a new email.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Shaun VermaakTechnical SpecialistCommented:
I think you need to add a .From value
Rio SadewaAuthor Commented:
tks Shaun Vermaak...
how do i enter the code? can be explained in detail?
Shaun VermaakTechnical SpecialistCommented:
See line 4
With OutMail
        .To = To1
        .CC = c1
        .From = "SomeEmail@SomeDomain.com"
        .Subject = "Informasi Stock Clear Area " & area1 & " " & wk1
        .htmlBody = "<font face = calibri light ><font size = 3> " & "Dear Bapak/Ibu,<br><br>Berikut informasi Stock Clear Area " & area1 & " periode " & "<b>" & hari & "</b>" & "<br><br><br><br><b><span style='background:yellow;mso-highlight:yellow'> Untuk all area not clear / Belum info,</b></span> mohon re-submit dashboard jika stock sudah clear.<br><br>Terima kasih.<br><br>Best Regards,<br>" & dari & "</font>"
        .display
    End With

Open in new window

Rio SadewaAuthor Commented:
the code is not what I mean,
I want a button that can reply to an email. what formula can I use?
Shaun VermaakTechnical SpecialistCommented:
You can style the link as a button with the Bootstrap CSS. Using a button with JScript will not work
With OutMail
        .To = To1
        .CC = c1
        .Subject = "Informasi Stock Clear Area " & area1 & " " & wk1
        .htmlBody = "<a href="mailto:SomeEmail@SomeDomain.com">Reply</a><font face = calibri light ><font size = 3> " & "Dear Bapak/Ibu,<br><br>Berikut informasi Stock Clear Area " & area1 & " periode " & "<b>" & hari & "</b>" & "<br><br><br><br><b><span style='background:yellow;mso-highlight:yellow'> Untuk all area not clear / Belum info,</b></span> mohon re-submit dashboard jika stock sudah clear.<br><br>Terima kasih.<br><br>Best Regards,<br>" & dari & "</font>"
        .display
    End With

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shaun VermaakTechnical SpecialistCommented:
Best solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.