+ Reply to Thread
Results 1 to 2 of 2

EXCEL 2013 - opening read only files and editing them

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    EXCEL 2013 - opening read only files and editing them

    Hi All,

    Hoping to find some help with a problem I've been having. My work just upgraded to office 2013 and a few macros I created are not working anymore.

    I have a macro that opens a word document and populates it with information from the excel workbook. I have it so that the word document opens as read-only. Part of the code looks like this:

    Set wdDoc = wdApp.Documents.Open("U:\Data\Letterhead.docx", ReadOnly:=True)

    However, I get the run-time error '6124': You are not allowed to edit this selection because it is protected.

    If I change the code so that it doesn't open as read only, then it will work just fine. But I want to make sure the word document is kept as a read only file as it is a template. I don't want someone to accidentally save over the master template.

    The macro/code worked how i wanted it to in prior versions of excel, but wont work in excel 2013. Any ideas on why that is?

    Thanks...

  2. #2
    Registered User
    Join Date
    04-26-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: EXCEL 2013 - opening read only files and editing them

    nevermind..

    i figured out why it was happening and the fix...

    word 2013 will open read-only files in reading mode.
    I just added another line to the code:

    wdApp.ActiveWindow.View.readinglayout = False

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opening large (1-3gb) xml files in Excel 2013
    By Richard.W in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-09-2013, 09:53 AM
  2. [SOLVED] Can I use Excel, opening and editing files, online?
    By AlisonHunter in forum Excel General
    Replies: 0
    Last Post: 06-01-2006, 06:45 AM
  3. Replies: 7
    Last Post: 07-26-2005, 08:05 PM
  4. Why are my emailed excel files opening in Read only?
    By Paul Huhn in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1