General information
Category:
Object Oriented Programming
You could follow the OPEN method syntax to open the document as readonly:
expression.Open(FileName, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Format, Encoding, Visible, OpenConflictDocument, OpenAndRepair , DocumentDirection, NoEncodingDialog)
See more on Documents.OPen in the VB for MSWord help.
>Hi All,
> I am creating a word object in vfp app. I mergeing the data to this object. I need to open the word object as read only and not sure how to accomplish this.
>
> Can someone proint me to the right direction.
>
>Here is my code**
>
>lcspreadsheet = "C:\Program Files\CHARISMA\TMPKI0PNMee.Xls"
>LetterName = "H:\charisma\MEET152\Letters\MEET152R+H_CONFO_TEMPLATE.DOC"
>
>oWord=CREATEOBJECT("Word.Application") && create an instance of msword
>oWord.WordBasic.AppMinimize(1)
>oWord.VISIBLE=.T.
>oWord.Documents.OPEN(LetterName) **need to open this as read only.
>
>oWord.WordBasic.MailMergeOpenDataSource(lcspreadsheet,0,0,1,0,"","",0,"","", ;
> "Entire Spreadsheet", "","") ****complains here since word obj is *****not open as readonly.
>
>Thanks
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only