K
koms
hi Bob,
thanks for the prompt reply... no this hasn't helped solved my issue. Maybe
i should be a bit more precise.
I am not trying to edit the .dotm file (template) , its being loaded as you
would expect word to load all templates,macros, add-ins etc. What i wanted to
know was that word2000 - 2003 has a different behaviour in that i could have
one document open and then also create a second instance thru
CreateObject("Word.Application") and work with this instance in the
background.
In this case i did not have to check if there was an existing instance of
word already present and i did not have to piggy back on that instance. I
could always create a second independent instance of winword.exe and work
with that.
Has this behaviour changed with Word 2007 !!! coz presently it seems i cant
create an independent session of winword i.e two instances of winword.exe
without running into the template locked issue ( even when i am not trying to
edit the template !! ).
One possible work around to the issue i face is to use
GetObject(,"Word.Application") to get existing instances if they are loaded
and work with it. The issue with this approach is previously we have always
created new session of winword so that we can control everything and just
exit when we're finished using it. How can i try n acheive this with Word
2007.
I hope i have been able to put across the issue if not please do not
hesitate to ask !!
thanks in advance.
cheers
koms
=========================
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
=================================
thanks for the prompt reply... no this hasn't helped solved my issue. Maybe
i should be a bit more precise.
I am not trying to edit the .dotm file (template) , its being loaded as you
would expect word to load all templates,macros, add-ins etc. What i wanted to
know was that word2000 - 2003 has a different behaviour in that i could have
one document open and then also create a second instance thru
CreateObject("Word.Application") and work with this instance in the
background.
In this case i did not have to check if there was an existing instance of
word already present and i did not have to piggy back on that instance. I
could always create a second independent instance of winword.exe and work
with that.
Has this behaviour changed with Word 2007 !!! coz presently it seems i cant
create an independent session of winword i.e two instances of winword.exe
without running into the template locked issue ( even when i am not trying to
edit the template !! ).
One possible work around to the issue i face is to use
GetObject(,"Word.Application") to get existing instances if they are loaded
and work with it. The issue with this approach is previously we have always
created new session of winword so that we can control everything and just
exit when we're finished using it. How can i try n acheive this with Word
2007.
I hope i have been able to put across the issue if not please do not
hesitate to ask !!
thanks in advance.
cheers
koms
=========================
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
=================================