Solved

Changing file attribute when exporting to word.

Posted on 2004-07-30
4
263 Views
Last Modified: 2013-12-18
Can you change the attribute of an exported document to Word? I need the saved Word document to be read-only.
Part of the code that displays the generated document and saving.

wordobj.AppShow
wordobj.filesaveas "c:\Work\SMP\" & CNno & ".doc"
Thanks!
0
Comment
Question by:cyle
  • 2
  • 2
4 Comments
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Look atthe parameters for Word's SaveAs... one of them sets the file to read-only.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
Comment Utility
SaveAs(FileName, FileFormat, LockComments, Password, AddToRecentFiles, WritePassword, ReadOnlyRecommended, EmbedTrueTypeFonts, SaveNativePictureFormat, SaveFormsData, SaveAsAOCELetter)

ReadOnlyRecommended   Optional Variant. True to have Word suggest read-only status whenever the document is opened.


So, .SaveAs "c:\Work\SMP\" & CNno & ".doc" , , , , , , True
0
 

Author Comment

by:cyle
Comment Utility
Yes, but the user has to set this. I'd like the user not be able to edit the file that was converted from Notes to Word.
0
 

Author Comment

by:cyle
Comment Utility
Final code,
                   wordobj.filesaveas "c:\Work\SMP\" & CNno & ".doc"  , , , , , ,True, , , , , True
                   wordobj.fileclose
Thanks!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now