Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Read-Only Switch? (2000/SR-1)

    I'm trying to address a problem with our document management system (DMS) which allows users to open Excel or Powerpoint documents in Word. I'd like to be able to inform our users that they have converted an Excel or Powerpoint document and give them an option to exit without saving; however, if they stay in the document, I'd like to be able to force them to save the converted document as a new profiled document in the DMS. Optimally I would like to force Word to think that the document is "new" or "read only".

    Is there a document/file property that tells Word that a currently open file should be "read only"?

    (The DMS keeps me from effectively using the BeforeSave event so I think I'm only able to set this condition at the DocumentOpen Event).

    (My fall-back idea is to save a copy of the file in a temporary location, close it and then re-open the copied file as "read only" but I'd like to avoid the screen flickers and the time lag that this would cause. I also think that the DMS sometimes gets confused and doesn't release the "in use" status of the document to its database when a file is saved locally and then closed.)

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Read-Only Switch? (2000/SR-1)

    Hubert,

    No help here, just to confirm that the only way you're going to be able to change the status of a file to read-only is with the file closed, or on open (see Word VBA help for Open method of the Documents collection - but I'm sure you're already been there!).

    Gary

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Read-Only Switch? (2000/SR-1)

    Can you rewrite the FileOpen procedure so that the document is opened read-only?

    Documents.Open(FileName, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Format, Encoding, Visible)

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Read-Only Switch? (2000/SR-1)

    Thanks Gary & Jefferson. Unfortunately, the DMS has total control over the initlal document.open method (in a DLL nonetheless), so I can only control a file after it's opened. But I did your document.open syntax (after saving the file to the local temp directory, closing it and then re-opening it "read only"). And that approach is actually working quite well. Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •