method not known or available

B

btmcfadden

I am getting this error message on the line below reading:"For each oRvs..."
with the word "revisions" highlighted. WHY? I have references set. I have
included some of the surrounding code - please HELP! THANKS!

Set oDoc = oApp.Documents.Item(1)
Dim strCurrDate As Date
strCurrDate = Forms!Approval!txtDate
oDoc.Variables("DateEdited").Value = strCurrDate
oDoc.Variables("ApprovedBy").Value = sText
oDoc.Fields.Update
.Options.DefaultFilePath(wdDocumentsPath) = strSavDir
'accepts deletions so they are not shown in approved doc
Dim oRvs As Revision
For Each oRvs In ActiveDocument.Revisions
If oRvs.type = wdRevisionDelete Then
oRvs.Accept
End If
Next
 
H

Helmut Weber

Hi,
seems you are trying to access word from another application.
Therefore the reference to this application is missing in
Dim oRvs As Revision
try
Dim oRvs As oApp.Revision.
The same applies to ActiveDocument.Revisions
try
oApp.ActiveDocument.Revisions
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
B

btmcfadden

Yes, it is correct that I am accessing word from another application, Access.
I have adjusted my code and compiled. But, now I am getting a "user
defined" error.
 
Top