RESOLUTION
To resolve this behavior, start any Microsoft Office program before you start Visio. For example, start and quit Microsoft Word, and then start Visio.
To automate this process, create a script to start an Office program. Configure the script to run when each user logs on to the computer. By doing this, the script starts the Office program before the user starts Visio. The following two methods use sample scripts that demonstrate how to do this.
Method 1
Create a Microsoft Visual Basic Script file (.vbs file) that uses the Microsoft Windows Script Host (WSH) to check for the presence of the OfficeUserData registry keys. In the example used in this method, if the script detects that the registry keys are missing, the script silently instantiates Microsoft Word 2000. You can configure the script to start by using the Run key in the registry or by copying the script to the Startup folder of the user's profile on destination computers.
Create the Startword1.vbs Script
Microsoft provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft Certified
Partners, please visit the following Microsoft Web site:
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
The following is as example of to create a script to start an Office program:
- Start Notepad.
A new text file opens. - Copy and paste the following lines into the text file:
Dim objWd, strMyDoc,wshShell
On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
strMyDoc =
WshShell.RegRead("HKCU\Software\Microsoft\Office\9.0\Common\General\MyDocuments
s")
If err.number <> 0 Then
Set objwd=CreateObject("Word.Application")
objWd.Quit
Set objwd = Nothing
End If
- On the File menu, click Save As.
- In the File name box, type Startword1.vbs, and then specify a location where you want to save the file.
NOTE: Make sure that you enclose the file name with quotation marks (") so that Notepad will save the file with the .vbs extension.
- Quit Notepad.
Deploy the Startword1.vbs Script
You can deploy the Startword1.vbs script by using one of the following methods:
- Copy the Startword1.vbs script to the Startup folder of the All Users profile on the destination computers. For example, copy the script to the following folders as appropriate, where drive is the drive on which Microsoft Windows is installed:
- Microsoft Windows XP and Microsoft Windows 2000
drive:\Documents and Settings\All Users\Start
Menu\Programs\Startup - Microsoft Windows NT 4.0
drive:\Winnt\Profiles\All Users\Start Menu\Programs\Startup - Microsoft Windows Millennium Edition (Me) and Microsoft Windows 98
drive:\Windows\Profiles\All Users\Start Menu\Programs\Startup
-or-
-
-or-Copy the script to the root of the drive on which Windows is installed (for example, C:\Startword1.vbs), and then create a new string value in the following key in the Windows registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
The script is configured to run automatically the next time a user logs on to the computer.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may
require you to reinstall your operating system. Microsoft cannot guarantee that you can solve
problems that result from using Registry Editor incorrectly. Use Registry Editor at your own
risk.
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
270035 How to Modify the List of Programs that Run When You Start Windows
179365 INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup
137367 Definition of the RunOnce Keys in the Registry
Method 2
This method is similar to the example used in Method 1 in which you create a Visual Basic Script file (.vbs file) that uses the Windows Script Host (WSH) to check for the presence of the OfficeUserData registry keys. If the script detects that the registry keys are missing, the script silently instantiates Microsoft Word 2000. The difference between Method 1 and Method 2 is that Method 2 uses a script that removes itself from each user's Startup folder after the script is run once.
Step 1: Create the Startword2.vbs Script
Microsoft provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft Certified
Partners, please visit the following Microsoft Web site:
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
The following is an example of how to create a script that starts an Office program:
- Start Notepad.
A new text file opens. - Copy and paste the following lines into the text file:
Dim objWd, strMyDoc,wshShell
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
strMyDoc =
WshShell.RegRead("HKCU\Software\Microsoft\Office\9.0\Common\General\MyDocuments
s")
If err.number <> 0 then
Set objwd=CreateObject("Word.Application")
objwd.Quit
Set objwd = Nothing
end if
fso.DeleteFile WshShell.SpecialFolders("Startup") & "\Startword2.vbs"
- On the File menu, click Save As.
- In the
File name box, type Startword2.vbs, and then specify a location where you want to save the file.
NOTE: Make sure that you enclose the file name with quotation marks (") so that Notepad will save the file with the .vbs extension.
- Quit Notepad.
Deploy the Startword2.vbs Script
Deploy the Startword2.vbs script to the Startup folders of each user profile on the destination computers. For example, copy the script to the following folders, where
drive is the drive on which Windows is installed:
- Windows XP and Windows 2000
drive:\Documents and Settings\All Users\Start
Menu\Programs\Startup - Windows NT 4.0
drive:\Winnt\Profiles\All Users\Start Menu\Programs\Startup - Windows Millennium Edition (Me) and Windows 98
drive:\Windows\Profiles\All Users\Start Menu\Programs\Startup