![]() |
operating notepad from VBA
hello,
how can i 1. open notepad, shell ? 2. paste excel range as value into notepad 3. save notepad as html 4. close notepad ? or do it with create object ? thank for suggestion. rgs |
operating notepad from VBA
Shell will do it.
Perhaps you have some kind of "super" Notepad, but mine has no "save as HTML" function... -- Tim Williams Palo Alto, CA "pm" wrote in message ... hello, how can i 1. open notepad, shell ? 2. paste excel range as value into notepad 3. save notepad as html 4. close notepad ? or do it with create object ? thank for suggestion. rgs |
operating notepad from VBA
I'm curious why you'd want to go through all those gyrations with Notepad when
Excel allows you to save as html directly? And Notepad doesn't... Bill -------------------- pm wrote: hello, how can i 1. open notepad, shell ? 2. paste excel range as value into notepad 3. save notepad as html 4. close notepad ? or do it with create object ? thank for suggestion. rgs |
operating notepad from VBA
Bill Martin wrote:
I'm curious why you'd want to go through all those gyrations with Notepad when Excel allows you to save as html directly? And Notepad doesn't... i build all code in excel.. when saving excel as html you get each sheet as different subpage in html, moreover excel saves too much unnecessary styles and tags - i want to have control what i get in html code.. i use such a code: Sub notepad() Application.ScreenUpdating = False Dim FF As Integer Dim plik As String Dim tekst As String Dim kom As Range plik = "C:\Documents and Settings\user\Pulpit\webpage1.html" FF = FreeFile Open plik For Output As #FF For Each kom In Sheets("prob").Range("A1:B16088") tekst = kom.Text Print #FF, tekst Next Close #FF Application.ScreenUpdating = True End Sub |
operating notepad from VBA
You might find ideas at http://www.meadinkent.co.uk/xlhtmltable.htm
to help you do what you want directly from Excel. -- Gordon Rainsford London UK pm wrote: Bill Martin wrote: I'm curious why you'd want to go through all those gyrations with Notepad when Excel allows you to save as html directly? And Notepad doesn't... i build all code in excel.. when saving excel as html you get each sheet as different subpage in html, moreover excel saves too much unnecessary styles and tags - i want to have control what i get in html code.. i use such a code: Sub notepad() Application.ScreenUpdating = False Dim FF As Integer Dim plik As String Dim tekst As String Dim kom As Range plik = "C:\Documents and Settings\user\Pulpit\webpage1.html" FF = FreeFile Open plik For Output As #FF For Each kom In Sheets("prob").Range("A1:B16088") tekst = kom.Text Print #FF, tekst Next Close #FF Application.ScreenUpdating = True End Sub |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com