Re: create rtf document with VBA



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

.



Relevant Pages

  • Re: Programming in standard c
    ... functions would do - report size at time of inspection. ... the "size" of a compressed, or partially compressed, or sparse file? ... 10GB which is the "data size" required to store it on another file system ... You can't tell this from the size on disk, ...
    (comp.lang.c)
  • Re: Divining the full pathname of a file, all logicals translated
    ... then all that counts is if files under that set of paths changes or ... What possible difference could changing the physical disk make, ... compare it to the "current" state when an audit report is run. ...
    (comp.os.vms)
  • Re: Win2k3 R2 - Storage Reporting on File Svr Cluster (SCSI-Attach
    ... adapters and create the shared disk fine, but the native MS disk resource ... to generate reports on shared disks for which a cluster disk resource ... i get the error that it's on a cluster server. ... online that you want to report on. ...
    (microsoft.public.windows.server.clustering)
  • Re: Stop Error Message: 0X0000007A(OXC03E10A8.....................
    ... enough to read the report. ... It could be that a minor case of disk corruption caused ... Run Chkdsk /f /r on the system partition. ... chkdsk may be a bad decision if disk corruption is suspected. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: chkdsk /f errors in Event Log
    ... A disk check has been scheduled. ... Pro the day after purchase. ... I can still get one clean "no problems found" report if I run ... I booted from the original XP Pro CD and ran chkdsk ...
    (microsoft.public.windowsxp.general)