Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access/Windows 2K problem

Status
Not open for further replies.

SaintM

Programmer
Sep 4, 2001
3
GB
Hi,

We recently had some Windows 2000 workstations delivered and am having a bit of a problem with Access 97.

I have some code in an access module to create a word document based on a template stored on a network drive and then chuck data into said document.

Problem is, I am getting the following message (that I didnt get on win98 or WinNT 4.0):

Runtime error 5981.
Could not open macro storage.

The code is:

Option Compare Database
Option Explicit
Dim wrdapp As Word.Application, newdoc As Word.Document, myRange As Word.Range

Sub CreateTrainerLetter(intIndex As Integer)
Call CreateWordObject
wrdapp.Visible = True

--THIS IS THE LINE THAT CAUSES THE ERROR--
Set newdoc = wrdapp.Documents.Add(Template:="G:\ETAResources\Office resources - forms, logos, maps etc\templates\eta templates\Blank paper.dot")
-------------------------------------------

Also, after some tinkering I have found that the code runs fine when a user with admin rights runs it, but normal users get the error.

Anyone able to help? its driving me mad!
 
Hello,
I had the exact same propblem. Basically the code is fine but runtime error 5981 means that the permissions settings for the word documents or the folder that they are in restrict saving/opening/creating etc.
What you can do is go on to all related folders and change the permission setting in security to read write and execute only. This can be done by double clicking on the user or user group whilst in permissions.
Let me know is this works i am very intrested to find out.
All the best Andy:-9
 
Cheers Andy, I think that with a bit of permission granting we have managed to get past that problem now.
However, now on several of the workstations I'm getting a 1512 error (unable to open document, ensure it is .doc file) when trying to open a template.
It makes no sense to me, as im opening a template not a docuement.
PS, i get the same message when file/new in word without even touching access :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top