Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4004
  • Last Modified:

VBA Word Change Unsaved Document Name "Document 1"

I have a system that outputs a report as a Word Document so the user can modify and print without actually saving the document.
Users are opening multiple docs and their taskbars are getting cluttered with Word docs called "Document 1", "Document 2" etc. There's often the need to keep them open for a while, but at no time is there the need to save them!
What i'd ideally like to do is change that default name without saving the document (ie to the Customer Name or similar). I've tried changing the BuiltInDocumentProperties("Title") property but that doesn't change what's shown in the taskbar.

Any ideas?
0
ianmair329
Asked:
ianmair329
1 Solution
 
XconeCommented:
Hi,

Try using the activewindow caption
Sub ChangeWindowName()
  ActiveDocument.ActiveWindow.Caption = "MyCustomName"
End Sub

Open in new window

0
 
ianmair329Author Commented:
nice work - thanks!
i'd looked through most of the properties but didnt spot that one!
thanks again
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now