I am trying to replicate the behavior of the Assistant when you try to save a file as a read only file. When you try this, Word displays the Assistant with a message that the file is read only and list the full path and name of the file the user attempted to save over. I have an error handler that will generate a balloon, but I don't know how to display the name and path of the file the user tried to save over. Any ideas on what should replace the ????? in my code below. Thanks:
[VBA]
Handler:
If Err.Number = 5155 Then
MsgBox ActiveDocument.FullName
Set Balloon = Assistant.NewBalloon
With Balloon
.Icon = msoIconAlert
.Heading = "Microsoft Office Word"
.Text = "This file is read only: " & ???????.FullName
.Button = msoButtonSetOK
.Animation = msoAnimationGetAttentionMajor
.Show
End With
Else
Exit Sub
End If
[/VBA]