• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Changing file attribute when exporting to word.

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
cyle
Asked:
cyle
  • 2
  • 2
1 Solution
 
qwaleteeCommented:
Look atthe parameters for Word's SaveAs... one of them sets the file to read-only.
0
 
qwaleteeCommented:
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
 
cyleAuthor Commented:
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
 
cyleAuthor Commented:
Final code,
                   wordobj.filesaveas "c:\Work\SMP\" & CNno & ".doc"  , , , , , ,True, , , , , True
                   wordobj.fileclose
Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now