Hi =?Utf-8?B?RGVtb24wOTA5Nzc=?=,
I'm afraid there's no way to get Word to understand what you want it to do. As
far as Word is concerned, if it's read-only, it's read-only. There's no way to
attach the template in that condition and avoid the dialog.
What you might need to do, instead, is to execute a macro when such a document
opens that either removes all the styles, then recreates the ones you need or
copies them across from a source file using OrganizerCopy.
The style template its bounded to the doc1, doc2 doc3 & doc4 with the
purpose of updating styles only
But the Style Template is ReadOnly Password Proctected, When I run the code
which loops in four documents, Open the document as read only, but because
there is a Attached template it gets the ReadOnly Dialog, we need the Read
Only Dialog in Place, how can I attached the template as read only to the
document?
TemplName = "C:StyleTemplate.dot"
arrDocPaths = Array Of Four Doucment Paths & Names
intSubDocumentCount = 4
For cntSubDocs = 1 To intSubDocumentCount
Set objTempDoc = Documents.Open(FileName:=arrDocPaths(cntSubDocs),
Visible:=False, ReadOnly:=True)
objTempDoc.Content.Copy
Selection.Paste
objTempDoc.Close False
Next
Can I run the following line as read only?
objTempDoc.AttachedTemplate= TemplName
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail
