Re: create rtf document with VBA
- From: insomniux <dispose02@xxxxxxxxxxxxxx>
- Date: Thu, 29 Nov 2007 12:22:54 -0800 (PST)
I thought this command exports an existing report to disk (and
optionally opens Winword). I do not have an existing report I could
use, instead I have a variable in a module.
Thanks for your suggestion
Insomniux
On 29 nov, 21:17, bobh <vulca...@xxxxxxxxx> wrote:
Hi,
Have you looked at the Docmd.OutputTo command? it might get you what
you want
DoCmd.OutputTo , "rptname", acFormatRTF, "path/name to store output",
True
bobh.
On Nov 29, 3:08 pm, insomniux <dispos...@xxxxxxxxxxxxxx> wrote:
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
.
- References:
- create rtf document with VBA
- From: insomniux
- Re: create rtf document with VBA
- From: bobh
- create rtf document with VBA
- Prev by Date: Re: create rtf document with VBA
- Next by Date: Re: Fastest way to do this?
- Previous by thread: Re: create rtf document with VBA
- Next by thread: Re: create rtf document with VBA
- Index(es):
Relevant Pages
|
|