Hi Kathy,
Sub test445()
Dim oWrd As Object
' Dim oWrd as Word.Application
' doesn't work here and now for unknown reasons
' though all references are set
Dim x As Long
Set oWrd = GetObject(, "Word.Application")
' Word already running
With oWrd
For x = .RecentFiles.Count To 1 Step -1 '!
' I missed that in my first posting
If .RecentFiles(x).Path = "C:\blue" Then
If .RecentFiles(x).Name = "test1.doc" Then
.RecentFiles(x).Delete
End If
End If
Next
End With
End Sub
If you prefer Steve's code,
you would have to tell Access, that recentfile
is a Word-object, like
Dim oRecFile as oWrd.recentfile
whereby oWrd would be Word.Application.
However, nothing I've tried worked with recentfile.