File Access Denied with FoxPro Data Attached to Template

Last reviewed: February 5, 1998
Article ID: Q122755
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

SUMMARY

After you open a mail merge main document based on a template that has been attached to a FoxPro database, you receive the following error message if you attempt to open your FoxPro database:

   File Access Denied

CAUSE

This behavior occurs because the database is set to Exclusive use. By design, when you create a Word document, you open the template in the background. If the template is attached to a data source, that data source is also open in the background. Therefore, if the database is set to be opened exclusively, and if it is already open in Word, you are denied access to it if you attempt to open it in FoxPro.

WORKAROUNDS

Method 1: Set the FoxPro database to Shared file use. By default, FoxPro

          opens the database for Exclusive use.

Method 2: Modify the Word template and remove the attachment to the Fox Pro
          data source.

Method 3: Create a main document based on the Normal template or another
          template. Then attach your data source.

Method 4: Record an AutoNew macro for the mail merge template that attaches
          the data source to your new main document.


KBCategory:
KBSubcategory: kbmerge kbtemplate
Additional reference words: 6.0 6.0a 6.0c winword merge main word6
document template datasource datafile attach attached access denied
fox pro foxpro database data source data file
Keywords : kbmerge kbtemplate kbinterop
Version : 6.0 6.0a 6.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.