Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Smile Unanswered: export Access report to Word

    Hi, I have a problem in exporting report designed in Microsoft Access to Microsoft word. The report has a picture but when exporting to the word, the picture disappear. I know that by exporting in sNP format solve this problem but the problem is the user must allow to make changes to the report after exporting so I need to export to word in RTF format in order to allow user to edit the words.

    Is any solution which is simple and not so complicated to this problem?

  2. #2
    Join Date
    May 2004
    Moscow, Russia

    using com programming for Microsoft Word

    1 create Template MSword file
    with <name> <curdate> and other tags in some places of text

    2 in vb code set to variable msword application object
    Set wrd = CreateObject("Word.Application")

    3 open Template for editing
    wrd.Application.Documents.Add Template:="C:\base\..\tmpl\" & filename , NewTemplate:=False, DocumentType:=0

    4 replace tags
    Find_str = "<name>"
    Replace_str = realvalue

    With wrd.Application.selection.Find
    .Text = Find_str
    .Replacement.Text = Replace_str
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    wrd.Application.selection.Find.Execute Replace:=2

    6. other operations with word may be recorded by built in word macro recorder and pasted in vb code

    7 wrd.Application.Visible = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts