[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Question for qwaletee.

Posted on 2004-07-30
7
Medium Priority
?
212 Views
Last Modified: 2013-12-18
RE: Changing file attaribute when exporting to word.

A follow-up for this please, why is WORD locking the exported document that it created and doesn't close it. From the previous question I already added
   wordobj.fileclose after it is saved. Why is it locking?
0
Comment
Question by:cyle
7 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11680156
Interesting.  I would set Word to visible, and see if it actually closes it.  (You may want to test with the fileclose commented out, so you see it staying open, then uncomment it, and see if it closes.)
0
 

Author Comment

by:cyle
ID: 11680195
When I try to actually save it again, it gives "Microsoft Word: Word cannot save this file because it is already open elsewhere."
0
 

Author Comment

by:cyle
ID: 11680361
I tried your suggestion. Now, I also tried to clean the folder and shut down my PC. Opened all application and created new data. This time word lets me save it, then I did the second time and saves it again but I noticed that when I open my word application to view the file it starts with Document2 and when I open the document I exported, word prompts "Do you want to revert the saved document ABC-123."  
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:cyle
ID: 11693359
Does anybody else have an idea why the word doc created is locking (Word is locking it!).
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11695535
Did you try my suggestion to see if it is actually closing the document?
0
 
LVL 12

Accepted Solution

by:
fulscher earned 1500 total points
ID: 11698526
I haven't read your previous post, since this is a new question.

Word keeps a lock on the document until you kill all instances of it:

Set wordobj = Nothing

Should do the trick.

You could also open another file; the previous file will then be unlocked, if I remember correctly.

Hope this helps
Jan
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11708226
I read your previous question. THere are two ways to do this.

1. Control the file attribute from the OS - in this case, if the user goes to explorer and modifies the file atribute, he will be able to save the document. SO this is not a fool-proof mechanism. However, that problem can also be worked out.

2. Control the file attribute from MS Word - In this case, your answer lies in the 6th parameter, WritePassword. While saving, you can assign a password to the file. Now you file is LOCKED. Untill the user knows the password, he/she can't edit the file. Not even by modifying attribute from the OS, because your document is locked by Word. Only a person who knows the password can edit the file in that case.

wordobj.filesaveas "c:\Work\SMP\" & CNno & ".doc"  , , , , , "PasswordToEditFile",True, , , , , True


0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question