help on using wordpad in stead of Word
hi,
I have the following code:
Code:
Dim MyWord As Word.Application
Dim WordDoc As Word.Document
Set MyWord = CreateObject("Word.Application")
Set WordDoc = MyWord.Documents.Add
MyWord.Visible = False
'MyWord.Activate
MyWord.Selection.Font.Name = "Arial"
MyWord.Selection.Font.Size = 12
MyWord.Selection.InsertFile FileName:=frmSelectDir.lblTemp & "\releasenotes.txt"
MyWord.Selection.TypeText vbNewLine
MyWord.Selection.TypeText "Aard van de change: "
MyWord.Selection.InsertFile FileName:=frmSelectDir.lblTemp & "\AardChange.rtf"
MyWord.Selection.TypeText vbNewLine
'Save the file. If the document exists it is overwriten
WordDoc.SaveAs frmSelectDir.lblTemp & "\algemeen.doc"
WordDoc.Close
Set WordDoc = Nothing
Set MyWord = Nothing
this works like a charm but I would really like to use Wordpad in stead of Word to save network resources.
there is also no need at all to save that last bit as a .doc, it can be a .rtf too.
could anyone help me converting this code as such?
thanks a million in advance!!!
Re: help on using wordpad in stead of Word
WordPad doesn't expose an automation interface. Unlike Word, which is an ActiveX EXE.
Most of what you can do in WordPad you can do using a RichTextBox anyway.
Re: help on using wordpad in stead of Word
well, basically what this code does is this:
I have two forms, both with a rich text box. those rtf boxes both save their contents to a .rtf.
this code combines those two files into one.
so what it comes down to is the question "how do I combine multiple rft files into one, using wordpad"
:)