Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public WithEvents wdApp As Word.Application
Private Sub Document_Close()
Set wdApp = Nothing
End Sub
Private Sub Document_Open()
Set wdApp = Application
End Sub
Private Sub wdApp_WindowBeforeRightClick(ByVal Sel As Selection, Cancel As Boolean)
If Sel.Document Is ThisDocument Then
Cancel = True
MsgBox Sel.Text
End If
End Sub
Perhaps not naively, but I'm pretty world-weary.kjv1611 said:I don't believe that's naively possible.
I don't use word enough for this to be worth my time, but in pre-2007 Excel versions, I avoided that by having an entire custom toolbar full of custom buttons.TonyJollans said:The tricky bit, of course, is deciding which toolbars you want to add your macro to.
kjv said:So, what if you're in Word 2007? Is there a way to do it there?
If Sel.Document Is ThisDocument
Can Selection ever be in another document from ThisDocument? Is not Selection defined as the cursor location in the ActiveDocument...thus ThisDocument?
I am not saying you are incorrect, as my brain is definitely off.