create rtf document with VBA
- From: insomniux <dispose02@xxxxxxxxxxxxxx>
- Date: Thu, 29 Nov 2007 12:08:21 -0800 (PST)
Hi,
I use access 2000 on WinXP
In an MsAccess module I've a variable which contains an ascii text
which could form a valid RTF document. Now I want my module to create
a new instance of MsWord which shows the RTF document. I've managed to
create a Word document with the following code:
On Error Resume Next
Set Ap = GetObject(, "Word.Application")
If Ap Is Nothing Then
Set Ap = CreateObject("Word.Application")
End If
On Error GoTo 0
Set Doc = Ap.Documents.Add(template:="Normal.dot")
Doc.Activate
If I now add the rtf-formatted text, I get (as expected) the ascii
code.
I'm sure I could find the solution in the help text of MsAccess and
VBA, but for some reason Microsoft does not want to install the help
texts correctly on my PC. So I'm stuck.
Could someone please give me the clue to create the new-rtf-formatted
file? Preferably the file need not to be saved on disk (first).
Thanks a lot.
Insomniux
.
- Follow-Ups:
- Re: create rtf document with VBA
- From: Neil
- Re: create rtf document with VBA
- From: bobh
- Re: create rtf document with VBA
- Prev by Date: Re: Call the standard Windows File Open/Save dialog box
- Next by Date: Re: Access 2003 and SQL Server 2000 record locks (long)
- Previous by thread: Fastest way to do this?
- Next by thread: Re: create rtf document with VBA
- Index(es):