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
Solved

VBA Word Change Unsaved Document Name "Document 1"

Posted on 2009-05-19
2
3,222 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
2 Comments
 
LVL 4

Accepted Solution

by:
Xcone earned 200 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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…

789 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