Word 2007 + programmatic second instance thru VB.Net 2005

K

koms

hi everyone !!

I have run into a problem that appears to be a bug in Word 2007.

If I save a .dotm file in Word's startup folder, the file seems to get
locked by Word while Word is open, which is OK. The problem is that when I
open another instance of Word, word complains that the .dotm is locked for
editing, when it really isn't. I am doing this thru my vb app !!

I know that there are plenty of applications that install templates in
Word's Startup folder, and there are also many situations where more than one
instance of winword.exe is running, so I'm kind of surprised that I couldn't
find anything about this in the knowledgebase or newsgroups.

Here are the steps to reproduce the problem (using the released version of
Word 2007 on Windows XP):

1. Open Word 2007. Save the untitled document as:
C:\Documents and Settings\username\Application
Data\Microsoft\Word\STARTUP\MyDotm.dotm

2. Close the document and close Word.
3. Go to Start > Run, type "winword /n", and click OK. Word Opens with no
open document (/n means don't start with an empty document).
4. Repeat step 3 (Go to Start > Run, type "winword /n", and click OK.

Error: A new instance of word opens (which is correct), but the following
dialog comes up from Word:

Do you want to:
Open a Read Only copy
Create a local copy and merge your changes later
Receive notification when the original copy is available"

has anyone else run into this problem ???... this was posted by somebody
somewhere else as well (a site called awomantoldme) n still havent found a
solution to this !!!

******* Hope the MVP's can help out here !!!!! *********

cheers
 
B

Bob Buckland ?:-\)

Hi Koms,

You may want to use the link below to also post this in the Word Programming discussion group.

Starting Word with no visible new document does not prevent the templates in the Startup folder from being attached to and
accessible to Word (Alt, T, I) and a Windows 'in use' lock file is created at that point (check the Startup folder for the lock
file - hidden file named ~MyDotM.dotm with your example). The template can be edited through the use of the Document Building
Blocks, macros and other means and Word doesn't support multiple uses of the same file whether it's by two users or two instances
for the same user.

While Word also creates lock files for any Word 97-2003 format .dot files in the Word 2007 Startup folder it doesn't raise the
warning on starting Word for those. (Use File=>Save as with your MyDotM.dotm to save another copy to \STARTUP as MyDotm.DOT (Word
97-2003 template). It may, however, 'wait' to warn you that two copies are in use when you try to save a change that was made to it.
:)

If you start a new document from the 1st instance and use Insert=>Quick Parts=>Building Blocks Organizer then close that dialog then
repeat that in the 2nd instance you'll likely get the same message for other 2007 templates (not in the startup folder) at that
point. If one of those templates is a .dot file, then that would be one where you can likely edit a building block in both copies
and get the warning only when you try to close out the Word session.

==============
hi everyone !!

I have run into a problem that appears to be a bug in Word 2007.

If I save a .dotm file in Word's startup folder, the file seems to get
locked by Word while Word is open, which is OK. The problem is that when I
open another instance of Word, word complains that the .dotm is locked for
editing, when it really isn't. I am doing this thru my vb app !!

I know that there are plenty of applications that install templates in
Word's Startup folder, and there are also many situations where more than one
instance of winword.exe is running, so I'm kind of surprised that I couldn't
find anything about this in the knowledgebase or newsgroups.

Here are the steps to reproduce the problem (using the released version of
Word 2007 on Windows XP):

1. Open Word 2007. Save the untitled document as:
C:\Documents and Settings\username\Application
Data\Microsoft\Word\STARTUP\MyDotm.dotm

2. Close the document and close Word.
3. Go to Start > Run, type "winword /n", and click OK. Word Opens with no
open document (/n means don't start with an empty document).
4. Repeat step 3 (Go to Start > Run, type "winword /n", and click OK.

Error: A new instance of word opens (which is correct), but the following
dialog comes up from Word:

Do you want to:
Open a Read Only copy
Create a local copy and merge your changes later
Receive notification when the original copy is available"

has anyone else run into this problem ???... this was posted by somebody
somewhere else as well (a site called awomantoldme) n still havent found a
solution to this !!!

******* Hope the MVP's can help out here !!!!! *********

cheers >>
--
Please let us know if this has helped,

Bob Buckland ?:)
MS Office System Products MVP

LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.word.programming
or via browser:
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.word.programming

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top