Word Automation - locking files
Miklos_Hollender
Member Posts: 1,629
Now that's strange. A client is using some custom-made Word Automation from Navision that's been working for years and now it's broken, maybe due to a Word/operation system/whatever upgrade. The problem is that even though WordApp.Quit is called, the Word doc stays locked (even though it's not open) by that user. And the document is on a network drive, everybody is using that copy, so nobody else can use that automation function anymore.
I have a faint gut feeling that the whole stuff is badly written, because for mail merge I think one should use a .DOT, not a .DOC, but instead it's a .DOC that then gets modified by mail merge, printed, and then not saved.
But anyway, it worked for years. I think maybe the current versions of Word might be too strict about it - a modified document stays locked even if you close it without saving?...
Anyway, what I suggested to them to copy a copy to a local drive and use from there. I hope Word doesn't lock if it's the same user...
Any ideas?
I have a faint gut feeling that the whole stuff is badly written, because for mail merge I think one should use a .DOT, not a .DOC, but instead it's a .DOC that then gets modified by mail merge, printed, and then not saved.
But anyway, it worked for years. I think maybe the current versions of Word might be too strict about it - a modified document stays locked even if you close it without saving?...
Anyway, what I suggested to them to copy a copy to a local drive and use from there. I hope Word doesn't lock if it's the same user...
Any ideas?
0
Comments
-
Might be the reason that the Open2000 function is used for opening the document?0
-
it sounds like the Open2000 - method is used for opening Word2000- documents.
However, Open2000 is not intended to be used directly from the code.
http://msdn2.microsoft.com/en-us/librar ... 2000(VS.80).aspx0 -
Thanks... but it worked when Word 2000 was installed... now I think it's Word 2003 but the document is Word 2000 so the code should still be appropriate?0
-
I would try it with the default method 'Open'.0
-
...but converting the file first to 2003 format, right?...0
-
No, let the method 'Open' find out if it is a Word2000 or Word2003 document.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions