PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
MSWord - readonly and protected, what's the difference?-VBForums
Results 1 to 4 of 4

Thread: MSWord - readonly and protected, what's the difference?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    103

    MSWord - readonly and protected, what's the difference?

    I'm trying to get a line of code right, but am having trouble understanding the difference between these two things.

    Basically, I want to say, "if the document is readonly, remove the readonly property".

    VB Code:
    1. If ActiveDocument.ReadOnly = True Then
    2.         ActiveDocument.Unprotect
    3.     End If

    This doesn't work as apparently the file is readonly but not protected.
    Readonly is an unassignable property, so it's not possible to declare
    ActiveDocument.Readonly = False

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,680

    Re: MSWord - readonly and protected, what's the difference?

    Protected means that Word has been set to protect the contents of the file. Read only is a file level setting (right-click select Properties) and can't be unset from within Word. It will need to be unmarked from outside Word somehow.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    103

    Re: MSWord - readonly and protected, what's the difference?

    So if a file was protected I couldn't for example edit some of the text and save as a new document?
    Thanks for clearing that up

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,680

    Re: MSWord - readonly and protected, what's the difference?

    Correct.... I think that's the way it works.

    With Read-Only you can change the content, but then you have to do a File -> Save As... with it.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width