Hi all,

I have a colmun of data that needs to be exported to notepad.
I managed to make the routine works with the following codes:

Sub ExportData()
    Sheets("CSV").Range("B2", Cells(Rows.Count, "B").End(xlDown)).Copy
    Shell ("notepad.exe"), vbNormalFocus
    SendKeys "^V"
    SendKeys "%{F4}", True
    SendKeys "{ENTER}", True
    SendKeys "KL AUTHS", True
    SendKeys "%S"
End Sub
However, there's some improvement that I need:
1) I want to refer my file name from here
Sheets("Home").Range("E18")
can anyone please help me to embed it?
One thing to note, when i ran the code, the txt file was saved as HS instead of KL AUTHS. I tried with different names and apparently it will capture maximum two characters.

2) Based on the code, it saves to my default saving location. I would like to save the txt file in the same directory as my excel file.

Appreciate any assistance.

Thank you!