Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default opening and writing into notepad

hey all,

first time i'm ever trying to do something like this, and
i'm stuck. i know how to open up notepad through vba, but
not much else.

what i've got so far is this:

******
Private Sub CommandButton1_Click()

FormatInfo 'function to format cells in spreadsheet
ReturnValue = Shell("notepad.exe", 1)
CreateHTML 'write text into notepad

End Sub
******

basically, i want to create a html file after information
is pasted into a spreadsheet.


my questions are these:
1). how do i actually write into notepad, given if i have
a set html code, and only a few things will change?
2). those parts that will change for each new html file
are cell values in the spreadsheet. so this macro
basically makes html files much easier than copying and
pasting info over and over again for each new group of
info.

and then, ultimately, i want to save and close notepad,
and save it like "blah.html", if "blah" was in cell A3.

so, again, a bunch of the code is exactly the same. just
little parts change, which is why i wanted this macro to
work.


tia.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default opening and writing into notepad

Peter..
why use notepad? why not write it to
to a file directly (line by line) print#

search google for examples you'll find tons!
http://www.barasch.com/excel/custhtml.htm


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"peter" wrote:

i'm sorry for replying to my own post.

i figured out it was "sendkeys"

only problem i have now is trying to paste a lot of code
in between quotation marks.

if anyone knows how i can do things like

sendkeys "<html
<body
<title
....etc.etc.etc
</html"


please let me know. thanks.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert notepad .txt to xp .xl Dave Excel Discussion (Misc queries) 2 February 29th 08 12:52 PM
Writing to notepad file Jeff Excel Discussion (Misc queries) 2 October 23rd 06 03:16 AM
Notepad to excel T Miller Excel Discussion (Misc queries) 5 October 19th 06 10:56 PM
Pasting from Notepad Al Excel Discussion (Misc queries) 1 June 14th 05 02:41 AM
notepad to excel jeremy via OfficeKB.com New Users to Excel 1 June 9th 05 05:46 PM


All times are GMT +1. The time now is 04:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"