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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word 2007 upgrade issue

Status
Not open for further replies.

Palmyra

Programmer
Jan 5, 2007
150
US
The following code as working under Word 2003, but when a pc got upgrade to Word 2007, I got a 'runtime 70 permission denied' error.

I find the below on Microsoft, but I think I'm an administrator on this machine. The error happens where I put **. Any help appreciated.

"You attempted to access the registry, but your user permissions don't include this type of registry access.
On 32-bit Microsoft Windows systems, a user must have the correct permissions for access to the system registry. Change your permissions or have them changed by the system administrator."

oApp.Documents.Open (Worddoc)
oApp.Visible = True
MsgBox vbCr & _
"Batch Names Report " & vbCr & _
"" & Request & ".doc opened. ", vbOKOnly, "DM Batch Names Opened"
Else
If WordIsRunning = False Then
** Set oApp = CreateObject("Word.application")
oApp.Documents.Open (Worddoc)
MsgBox vbCr & _
"Batch Names Report " & vbCr & _
"" & Request & ".doc opened. ", vbOKOnly, "Batch Names Opened"
oApp.Visible = True
If oApp.Documents.Count > 0 Then
For Each oDoc In oApp.Documents
If Searchfolder & oDoc = Worddoc Then
oApp.Documents(Request & "_Batchnames.doc").Activate
Exit Sub
End If
Next oDoc

End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top