?
Solved

VBA Word Change Unsaved Document Name "Document 1"

Posted on 2009-05-19
2
Medium Priority
?
3,582 Views
Last Modified: 2012-05-07
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
Comment
Question by:ianmair329
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Xcone earned 800 total points
ID: 24420284
Hi,

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

Open in new window

0
 
LVL 3

Author Closing Comment

by:ianmair329
ID: 31582923
nice work - thanks!
i'd looked through most of the properties but didnt spot that one!
thanks again
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question