View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gordon Rainsford[_3_] Gordon Rainsford[_3_] is offline
external usenet poster
 
Posts: 26
Default 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