Open MS word file in read only mode

Hi All,
Is there any function module or method to open an MS word file (which is not read only ) in read only mode.
User should only be able to see the document ,he should not be able to make any changes.
Regards,
Mukul Sharma.

Hi,
Where is the document stored? In a content server? In BDS? In a directory?
Regards,
bert

Similar Messages

  • Issue regarding open word file and read only mode using c# & MS-word interop

    i am programmatically open a word file for search and highlight keyword. my routine is working fine. the problem is when i am opening the file programmatically then a dialog come and ask me to open file in read only mode. the dialog look like below one
    actually i do not want to open the file in read only mode because people can open and like to change and save. so guide me what i can do to not to open the file in read only mode.
    here is my full code. just have a look and tell me what is wrong in my code or tell me any trick as a result i can open the file not in read only mode. here is my code.
    private void button1_Click(object sender, EventArgs e)
                object fileName = "";
                string filePath = "";
                string strSaveasPath = "";
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                    fileName = openFileDialog1.FileName;
                    //strSaveasPath = Path.GetDirectoryName(path.ToString());
                //fileName = "Z:\\C0000000003.doc";
                List<string> _list = new List<string>();
                _list.Add("tridip");
                _list.Add("arijit");
                //object fileName = "D:\\CVArchievePath\\C0000000001.doc";
                object textToFind = "test";
                object readOnly = false;
                Word.Application word = new Word.Application();
                Word.Document doc = new Word.Document();
                object missing = Type.Missing;
                try
                    doc = word.Documents.Open(ref fileName, ref missing, ref readOnly,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing);
                    doc.Activate();
                    object matchPhrase = false;
                    object matchCase = false;
                    object matchPrefix = false;
                    object matchSuffix = false;
                    object matchWholeWord = false;
                    object matchWildcards = false;
                    object matchSoundsLike = false;
                    object matchAllWordForms = false;
                    object matchByte = false;
                    object ignoreSpace = false;
                    object ignorePunct = false;
                    object highlightedColor = Word.WdColor.wdColorGreen;
                    object textColor = Word.WdColor.wdColorLightOrange;
                    object missingp = false;
                    Word.Range range = doc.Range();
                    foreach (string line in _list)
                        textToFind = line;
                        bool highlighted = range.Find.HitHighlight(ref textToFind,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing);
                    System.Diagnostics.Process.Start(fileName.ToString());
                catch (Exception ex)
                    Console.WriteLine("Error : " + ex.Message);
                    //Console.ReadKey(true);
                finally
                    //doc.Close(missing, missing, missing);
                    if(doc!=null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(doc);
                    if (word != null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(word);
                    word = null;
                    doc = null;
                    GC.Collect();
                    GC.WaitForPendingFinalizers();

    I know it's a very old issue and I reached to this page looking for a solution. Finally, I have found a fix to this problem.
    The problem is that we create an instance of Word and do not close it correctly. This makes program believe that the file is already open and hence you're getting the respective message of file being locked by you.
    Set the visibility of your application to true and then when you close it both file and instance should close and you will not get the problem again.

  • I am not able to use Firefox with Sharepoint - I can only open a file in read-only mode and cannot checkout the document and edit.

    I would like to use Firefox with Sharepoint.
    However, I am only able to open a file in "read only" mode whch means I cannot edit the document and save it. I am also not able to "check-out" a document in Sharepoint and edit it at the same time.

    This may not work for everyone, but I solved this problem by clicking on the file name in sharepoint, not the document icon to the left of the name. This then brought up the various options, including checking out, editing, version history etc. It seems obvious but I have only just realised this!

  • Opening the file in read only mode

    hi all,
    i am using
    i want to open any type of files in read only mode using host command.so first i am setting the attribute to read only and then opening the file. But still the opened file is editable. i have written like below
    Host( 'cmd /c  attrib +r "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);
    Host( 'cmd /c "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);is this is the way to open the file in readonly mode?
    Along with the above the files which i opened with the help of above said code those files i am not able to delete also.(i have to delete the selected file)
    i thing when i am setting the attribute something is going for a mess!
    Please help.
    Thanks..
    Edited by: GD on Jun 23, 2011 2:25 AM

    hi,
    Read only means you cannot mofiy the file. This also includes that you cannot delete a readonly-file yes,
    what i am doing is i have three button in my layout 'save','view' and 'delete'.
    1.so when user press 'save' button after selecting the file then the file gets saved into the specified.
    2. when user press 'view' button the file has to open in read only mode.
    for this i have written above mentioned code(but still i am able to edit the file)
    3.when user press 'delete' button the file has to be deleted from the specified location.
    so my problem is after setting file to read only mode, i am able to edit but i am not able to delete it.
    What i am using to set the file to read only mode is right?
    Please help.
    Thanks..

  • Open pdf files in read-only mode

    Hi all,
    I want to open a file and I want to have option rewrite the file while it's open in the Reader.
    Is there any way how to open the file in the read-only mode and even from cmd in Windows?
    Thanks in advance.

    You can set security in the file to dissallow changesby going to File>Properties>Security in Acrobat. But you can't change anything with Reader.

  • Office 2013 opens file in read only mode

    I have a client on Windows 8.1 Pro using Office 2013. When he access an office file from a network drive it opens in read only. When he saves the file to his desktop using save as it lets him open the file again in compatibility mode but he is unable to
    then overwrite the file on the network folder. It keeps giving him a permission error. I have deleted his profile, changed settings in office trust center settings and checked folder permisisons. I am out of ideas. Can anyone help me out here.
    Thanks

    Hi,
    Thanks for the reply.
    From the user, "Every file that I open, opens in read-only mode.  It appears that the security is set correctly and I have not changed anything, but, it does not allow it.  I have tried rebooting - not solved.  I tried disconnecting the shared drive and reconnecting - not solved.  However, when I do disconnect the mapped drive, I get a warning saying I have files open.  The problem occurs whether I access the files from the mapped drive or directly by drilling down through the folder structure." 
    When I try to move files over to the drive it says I do not have required permissions to overwrite or move a file. On a different computer he has full access but not on this one. Also the settings in trust center settings for file blocking and trusted locations
    also privacy.

  • Error when opening table container file keydb read only

    Hi Guys,
    We are installing solution manager 4.0 on windows/sql but we are getting following error and couldnt continue the installation
    FKD-00070  Error when opening table container file C:\PROGRA1\SAPINS1\SOLMAN\SYSTEM\MSS\CENTRAL\AS\keydb.xml for writing. Possible reason: "read-only"
    ERROR 2008-06-04 20:10:56.843
    FKD-00049  XML - Parser error: error: no DTD specified, can't validate in line 1, 1
    in file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\MSS\CENTRAL\AS\keydb.xml.
    Please help
    Regards,
    Santosh

    Further info
    keydb.xml is empty and the directory has got write access for everyone
    regards
    Edited by: Santosh Keerti on Jun 4, 2008 1:29 PM

  • Opening a Standby Database in Read-Only mode

    Is there anyway to open a Standby database up to date as of a certain time? I'm currently using the 2 commands to get close to the time required.
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    Such as, similar to this? RECOVER DATABASE UNTIL TIME '2012-01-25:15:00:00';
    We're on 11.1.0.7, which I'm currently very unhappy with.
    Thanks for any help, as my google-fu hasn't worked today.
    James

    Maybe
    I did a quick test :
    8:42 open the databases and start recovery
    8:43 check status from primary
    Shows sequence 75
    and "TO STANDBY" for switchover status
    Did log switches at 8:44, 8:45, and 8:46
    8:50
    SQL> alter database recover managed standby database cancel;
    SQL> RECOVER STANDBY DATABASE UNTIL TIME ' 2012-01-25:20:43:00';
    Media recovery complete.
    SQL>
    8:52
    SQL> alter database recover managed standby database disconnect from session;
    Database altered.
    Check status
    TO STANDBY and sequence 78Still need to check alert logs and do another log switch. It checks out so the quick test works.
    However the quick test is incomplete since there was no before and after data in the test and the time period was very short.
    Andy may be right, but I would test, test test. ( if you do please let us know the results )
    Thanks Andy!
    Best Regards
    mseberg
    Later
    After sleeping on this I decided my first thought is probably correct. You cannot go back in time and still be in sync. While the test statement did not error or produce any alert log entries, it probably did nothing. Oracle is smart enough to know you cannot have your Cake and eat it too.

  • Not able to open XMind files from IE in read only mode

    I have configured my SharePoint Farm to support .xmind file types
    Below are the steps I have done
    1.  
    Added an entry in DOCICON.XML
        <Mapping Key="xmind" Value="xmind_file1.png" EditText="XMind Mapping Software"  OpenControl="SharePoint.OpenDocuments"/>
    2. Added an entry in htmltransinfo.xml
        <Mapping Extension="xmind" AcceptHeader="application/vnd.xmind.workbook" HandlerUrl="" ProgId=""/>
    3. Added a MiME type 'application/vnd.xmind.workbook' in the Inetmgr.
    Now, xmind files are getting detected, but I am not able to open xmind files in read only mode from IE.
    Xmind files are working perfectly from Mozilla, but my client wants the xmind to be working perfectly from IE.
    Need a help on this issue....

    Hi Aries,
       Please find the screenshot below , while I am trying to open the xmind file in read only mode. It is redirecting the user to a blank page...
    Also please find the extract from the fiddler when trying to open it after selecting the read only mode
    GET http://myserver/sites/Team_test_8/Documents/file1.xmind HTTP/1.1
    Accept: text/html, application/xhtml+xml, */*
    Referer:
    http://myserver/sites/Team_test_8/Documents/Forms/AllItems.aspx
    Accept-Language: en-US
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
    Accept-Encoding: gzip, deflate
    Host: myserver
    If-Modified-Since: Tue, 22 Apr 2014 06:40:41 GMT
    If-None-Match: "{3243523D-B412-4437-A587-FA02D4C3C763},9"
    Connection: Keep-Alive
    Cookie: WT_FPC=id=125.22.78.82-1203562128.30325182:lv=1398735003583:ss=1398735003583; WSS_KeepSessionAuthenticated={ce7264f1-49e7-4483-9413-eed8c6929dd7}; ASP.NET_SessionId=knrzwvfb03puo1551qwl3lut
    Authorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
    HTTP/1.1 401 Unauthorized
    Server: Microsoft-IIS/7.5
    SPRequestGuid: 16c42597-cfa9-4993-a19a-539ae9b5a7ec
    WWW-Authenticate: NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgomiyxgpfwFl18AAAAAAAAAAAKQApABIAAAABgGxHQAAAA9FAFIASQBDAFMAUwBPAE4AAgAQAEUAUgBJAEMAUwBTAE8ATgABABYARQBTAEUAUwBTAE0AVwAyADQAMgA1AAQAFgBlAHIAaQBjAHMAcwBvAG4ALgBzAGUAAwAuAEUAUwBFAFMAUwBNAFcAMgA0ADIANQAuAGUAcgBpAGMAcwBzAG8AbgAuAHMAZQAFABYAZQByAGkAYwBzAHMAbwBuAC4AcwBlAAcACACy5d2OcGPPAQAAAAA=
    X-Powered-By: ASP.NET
    MicrosoftSharePointTeamServices: 14.0.0.6114
    Date: Tue, 29 Apr 2014 06:02:10 GMT
    Content-Length: 0
    Proxy-Support: Session-Based-Authentication

  • Word 2010 opening document from SharePoint as Read-Only

    Hello,
    I am investigating an issue in our environment (Office 2010 clients accessing SharePoint 2010 files) where documents will open in Word but as read-only and the option to edit the document is not presented.  This can be reproduced by copying and pasting
    a link to a SharePoint document into the IE address bar and hitting <Enter>. A prompt will appear to open/save, etc. Clicking open will open the document but in read-only mode and there's no yellow bar to edit the document. The second time we perform
    the same task, the document opens with the Edit Document button available. The Office Document Cache Handler browser add-in is enabled. The issue is described exactly in the last bullet of the 'more information section of this MS KB article:
    http://support.microsoft.com/kb/2661910.
    "The Server read-only bar with the [Edit Document] or [Edit Workbook] or [Edit Presentation] button bar may be missing for other reasons when clicking on a hyperlink to a Office 2010 document stored
    on a SharePoint site for the first time. Subsequent clicks on the link will render the Server read-only bar."
    We have confirmed that using the OptimisticBHO registry value resolves the issue.  However, the support article says that this issue occurs for "other reasons".  Rather than deploy a registry hack to fix this, can someone elaborate
    on what the other reasons are so that we can tackle the root cause of the issue? Is this a known bug, is the behavior due to some security update is there a SharePoint configuration setting involved, etc.? It would be helpful to know exactly why
    the issue occurs so that we can plan the resolution appropriately.
    Thanks,
    Doug
    Douglas Cote

    Hi Doug,
    Please check the KB article below and see if it answered your question:
    http://support.microsoft.com/kb/2018958/en-us
    Hope this helps.
    Best Regards,
    Steve Fan
    TechNet Community Support

  • Opening a container in read-only mode (DB_RDONLY, setReadOnly())

    I have one process access a container in normal mode and another accessing it in read-only mode (XmlManager::openContainer with DB_RDONLY or XmlContainerConfig. setReadOnly(true) ), both with transactions. Is this:
    (1) wrong (potentially dangerous);
    (2) pointless (no benefits for the read-only process);
    (3) reasonable (potential benefits for the read-only process)?
    Whatever the answer, why is it so?
    Michael Ludwig

    hi,
    Read only means you cannot mofiy the file. This also includes that you cannot delete a readonly-file yes,
    what i am doing is i have three button in my layout 'save','view' and 'delete'.
    1.so when user press 'save' button after selecting the file then the file gets saved into the specified.
    2. when user press 'view' button the file has to open in read only mode.
    for this i have written above mentioned code(but still i am able to edit the file)
    3.when user press 'delete' button the file has to be deleted from the specified location.
    so my problem is after setting file to read only mode, i am able to edit but i am not able to delete it.
    What i am using to set the file to read only mode is right?
    Please help.
    Thanks..

  • How Real Time Apply works while physical standby is open in Read Only mode

    Hi,
    With Active data guard option, we can open physical standby DB in read only mode, while redo log are being applied. (Real Time Query)
    Standby Redo log (SRL) enables Real Time Apply (with "USING CURRENT LOGFILE" clause in recover database command on standby DB)
    I am interested to know, how Real Time Query works ?
    What is the mechanism with allows us to open physical standby DB in read only mode while redo logs are being applied continuously ?
    Regards,
    Sujit

    Dear user7419391,
    That is a new feature in Oracle Database 11g. MRP can use the real time apply in 10g but the concept here is different.
    Taken from the following document;
    http://www.ascent.co.za/documents/oracle/Oracle%20databse%2011g%20Active-Data-Guard%20datasheet.pdf
    *Unique Advantages of Oracle Active Data Guard*
    +Active Data Guard is an evolution of Data Guard technology, providing unique+
    +performance advantages while leveraging all other enhancements included in Oracle+
    +Data Guard 11g. For example, any Data Guard 11g physical standby database can+
    +be easily converted to a Snapshot Standby. A Snapshot Standby is open read-write+
    +and is ideally suited as a test system, able to process transactions independent of the+
    +primary database. A Snapshot Standby maintains protection by continuing to receive+
    +data from the production database, archiving it for later use. When tests are+
    +complete, a single command discards changes made while open read-write and+
    +quickly resynchronizes the standby database with the primary.+
    The other link in the previous post is excellent and you really have to read it to understand the active data guard aspects.
    Regards.
    Ogan

  • Error when opening XLSX file with Excel 2003 SP3, file does open but in read only mode with temporary name

    I am using Excel 2003 SP3 and have the Office 2007 compatibility pack installed.  When I open Office 2007 formatted Excel files (XSLX) directly in Windows Explorer, I receive the following error if I do not have Excel already opened:
    "Windows cannot find '<path to file>'.  Make sure you typed the name correctly, and then try again.  To search for a file, click the Start button, and then click Search."
    Even though I receive the error, the file does open; however, it opens in Read Only mode with a name such as "Xl0000024.xls".  The number seems to increment up each time it happens.
    Now here is the strange part.  If I have Excel already open and try to open the file in Windows Explorer, the file opens fine in Modify mode with no error and with the correct file name.
    I Googled the error I was getting and found KB211494.  It says I should uncheck the box in Options on the General tab that says "Ignore other applications", but this box is already unchecked in my case.  Any other ideas?  This is
    really frustrating as a small percentage of our company has upgraded to Office 2007 with the rest still on Office 2003.

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • SP2013 and Project 2013 - project files open in read-only mode with no options to edit only Save As

    Hi all,
    Environment:
    SharePoint 2013 (15.0.4420.1017)  RTM
    Windows 8 - Project 2013 (15.0.4433.1506) 32Bit
    Issue details:
    When opening .mpp files stored within SharePoint they are opened successfully within Project 2013 however they are opened in Read-Only mode with no options to edit/check out only Save As.  The
    same outcome is experienced if you click the document link within SharePoint or you chose to edit from the document menu. 
    Opening the file through windows explorer also opens only in read-only mode.
    To date we’ve tested the following
    Windows 7 – Office 2010 = working as expected
    Windows 8 – Office 2010 = working as expected
    Windows 7 – Office 2013 = opening as read only, no prompt to edit
    Windows 8 – Office 2013 – opening as read only, no prompt to edit
    Current thinking is that it is an issue with either the SharePoint Office Documents Class ActiveX control or Project 2013 itself interacting with SharePoint 2013.
    We have tested this in multiple SP2013 environments with the same outcomes.
    The workaround therefore is to save locally and then upload again which is not ideal.
    Unable to find an exact issue match to this.
    Any help with this appreciated.

    Hi Dan,
    For us after investigating this further it was found that using the document menu to edit or checkout and then edit results in the project file being opened in read-only mode. 
    The same issue was present for Visio files.
    Using the FILES ribbon menu results in the document being opened in edit mode successfully in both Project and Visio.
    Please note that we found that this issue only exists within document libraries where checkout is required to edit which was our case.  If checkout is not required the document
    menu can also be used as expected.
    Cheers,
    Dan

  • Project files open in read-only mode

    project files open in read-only mode in ms project 2013.But in the case of MS Project 2007 it opens in READ\WRITE mode .what should i do so that project will opens in READ\WRITE mode by default in MS Project 2013

    In addition to John's excellent reply, I'd add that if you are talking about Project Server, this is by design that the projects in 2013 version open in read-only mode, in order to require an explicit operation to check-out the file. This prevents to have
    many checked out files by mistake.
    See this
    article on my blog.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

Maybe you are looking for

  • ALV Webdynrpo - issues

    Hi, I have created a ALV webdynrpo and have following questions. 1- I have created a zstructure and used in my webdynpro.I don't want to display one of the column.How do we hide that? 2- How can we re-arrange columns sequence in the output view ? 3-

  • Aperture - Big Cleanup - Advice Please

    Frank, Kirby, Leonie, William, et al Attached is my Pictures Folder - many libraries and assorted image data.  All of this goes back to early versions of iPhoto as well as early versions of Aperture.  All of this is backed up.  All of the libraries w

  • I just watched a Netflix movie using my iPad 2. Now I need to know how to return the movie using my iPad 2 and deleting the movie from my queue?

    I just watched a movie using my iPad 2. Now I need to know how to return and delete the movie from my Netflix queue and account using the iPad 2?

  • WAP login / Radius / Windows 7

    It was suggested I ask my question in this forum. We are trying to log into laptops wirelessly.  The users can only log into laptops that they have cached credentials on, but we need them to be able to login for the first time while only connected vi

  • Back button in AS3

    I did a search on this and didn't find a successful answer yet. I need to have a back button in AS3 that'll remember the last frame visited from any frame in the site. There are various buttons to get to various frames, and the one back button will a