🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bu.localpostings
Article #148

Printing Word Docs From Access 2000( comp.databases.ms-access)

#148
From: Thomas Dauria
Date: Thu, 30 Dec 1999 00:00
23 lines
1313 bytes
X-Orig-MsgId: <84gt1i$n91$1@news1.bu.edu>

I have the function below which worked perfectly well with
Access 97 and Word 97, but now when users on a machine with
Access 2000 and Word 2000 use this program it works the first
time but there after they can't execute the mail merge.  It
ends up saying that the original user still has the file open.

I don't understand the person manually shuts word down.  Anyway
here is the function pretty simple.

Public Sub printWordDocument(file_path As String)

    Dim wordApp As Word.Application
    Dim wordDoc As Word.Document
    Set wordApp = CreateObject("Word.Application")
    Set wordDoc = wordApp.Documents.Open(file_path)
    
    wordApp.Visible = True
    wordDoc.MailMerge.Destination = wdSendToNewDocument
    wordDoc.MailMerge.Execute
    
End Sub
Technical Details
Message-ID: <84gt1m$nk1$1@news1.bu.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1552e4,d440808e397cac55,start
X-Google-Attributes: gid1552e4,public
From: Thomas Dauria <tdauria@bu.edu>
Subject: Printing Word Docs From Access 2000( comp.databases.ms-access)
Date: 1999/12/30
Message-ID: <84gt1m$nk1$1@news1.bu.edu>
X-Deja-AN: 566695018
Organization: Boston University
X-Orig-Newsgrp: comp.databases.ms-access
User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (AIX/4-3)
Newsgroups: bu.localpostings