View Single Post
  #1 (permalink)  
Old 11-26-2008, 10:10 PM
Renee08 Renee08 is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Nov 2008
Posts: 2
Reputation: 0
Renee08 is on a distinguished programming path ahead
Default Opening a dotx file as read only

Currently I am creating a new Word document within the vb.net code and using AttachedTemplate to indicate what template the document should be based on.

It's possible for more than one person to be doing this at once, but the second person to run this code gets the "Locked for editing" dialog with the option of opening the template as Read only etc.

What I want to do is set the template to open/be attached as a read-only version (i.e. the equivalent of clicking "ok" to the Read only option). Is this possible?

A small sample of the code:

myWordDoc = myWordApp.Documents.Open(fullName, False, False, False)
myWordDoc .AttachedTemplate = strTemplateFilename

Thanks.
Reply With Quote