+ Reply to Thread
Results 1 to 18 of 18

Multiuser problem

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Multiuser problem

    Hi there

    The following code works fine for one user who press the button first and for second user it gives message "Read only document" locked for editing. Can anyone please change the code so that for each user it will open a copy of the word document and not the original one to avoid conflict.
    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Multiuser problem

    Excel is not a good choice for multi users
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    Whilst Roy is right, there are better options for a multi-user environment, Excel can work quite well and can sometimes be the only choice - been there :S

    I would say that you need to make the word document a template, each time it is then opened it will create a new document, I haven't tested this in your example, but I've done something similar successfully in the past

  4. #4
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi roy

    I am writing the code so that each user will work on a copy oc excel spreadsheet so thats not a problem I am facing as I have used the following code. If you see code in my first post then it prints off the word document perfectly but for multiple users it opens the same document so for one it works but for others its locked. Can if write something like below code to craete a copy of the word document evrytime and print it off so each user will work independently.

    Please Login or Register  to view this content.
    Thanks

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    Hi Lisa, did you try my suggestion?

  6. #6
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi kyle123

    Don't know exactly what I have to do. Can you make changes in the code to make it working as desired

    Thanks

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    No, not really. You need to save the word document "C:\Letter.doc" as a template, not a word document

    The line to open the template would then be something like:
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi kyle123

    I have all the word documents in Master folder so how can I save them as Word template.

    What steps do I need to follow?

    Thanks

  9. #9
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi Kyle

    Yes I saved the word document as document template so now in the code do I need to specify the path of the template or the word doument.

    Thanks a lot.

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    Open the document

    File > Save As > Save as type: "Document Template (*.dot)"

  11. #11
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Multiuser problem

    You'd better not use reserved words in VBA/Excel/Word to name your macros, functions, names, named ranges.
    This is all you need.

    Please Login or Register  to view this content.



  12. #12
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi snb

    The code you sent me works at my end but I have not tested whether it works for multiple users or not.

    Can you tell me what is difference in that code that will make it working for multiple users please?

    Thanks a lot.

  13. #13
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Multiuser problem

    You can even reduce the code to:

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    snb, can you please tell me how can we print two copies of each document.

    Thanks a lot

  15. #15
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    Like this:
    Please Login or Register  to view this content.

  16. #16
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Multiuser problem

    @Kyle

    I don't think so....


    Please Login or Register  to view this content.

  17. #17
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Multiuser problem

    @snb fair enough, serves me right for not testing it

    Scrap my last post

  18. #18
    Registered User
    Join Date
    08-09-2011
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Multiuser problem

    Hi guys

    Sorry I am back again. I am writing the following code that will extract data from Access table and merge that in word document.But sometimes it gives the "Microsoft Excel waiting for another application to perform OLE action" error message.
    Can anyone please figure out why the error is coming?
    Please Login or Register  to view this content.
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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