I was able to use the VBA code below to display a Word doc's file path in the title bar.
But as a result the file path is also displayed in the Word Windows 7 taskbar item.
How do I get Word to display
only the Word doc title in the Windows 7 taskbar instead of the file path? Can anyone give me Word 2010 VBA code for this? Thanks.
Code:
Sub AutoOpen()
'Display document name and path in the title bar.
ActiveWindow.Caption = ActiveDocument.FullName
End Sub
Sub FileSaveAs()
'Display document name and path in the title bar.
If Dialogs(wdDialogFileSaveAs).Show = 0 Then Exit Sub
System.Cursor = wdCursorNormal
ActiveWindow.Caption = ActiveDocument.FullName
End Sub