<1>dso Framer Control Object implements non-editable loading of Word files
Axframercontrol1.open (OldPath);
This.axFramerControl1.set_EnableFileCommand (DSOFramer.dsoFileCommandType.dsoFileSave, false); Implement a non-editable this.axFramerControl1.set_EnableFileCommand embedded Word file (dsoframer.dsofilecomm Andtype.dsofilesaveas, false);
Microsoft.Office.Interop.Word.DocumentClass w = (Microsoft.Office.Interop.Word.DocumentClass) This.axFramerControl1.ActiveDocument;
Object missing = false;
Object obj = true;
Object obj2 = "1234";
W.protect (Microsoft.Office.Interop.Word.WdProtectionType.wdAllowOnlyReading, ref obj, ref obj2, ref missing, ref obj);
<2>dso framer Control Object implements saving Word files without overwriting source files This.axFramerControl1.set_EnableFileCommand (DSOFramer.dsoFileCommandType.dsoFileSaveAs, false);
Microsoft.Office.Interop.Word.DocumentClass w = (Microsoft.Office.Interop.Word.DocumentClass) This.axFramerControl1.ActiveDocument;
Object filepath = (object) filepath;
Object MIS = type.missing;
W.saveas (ref filepath,ref mis,ref mis,ref mis,ref mis, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref MIS, ref mis); Save As
Axframercontrol1.close (); Off, thus eliminating the need for w.close ()
<3>axframercontrol1 Save the current Word file
Axframercontrol1.save (FilePath + filename, true, Type.Missing, Type.Missing);
The Save method is defined as follows:
public virtual void Save (Object Saveasdocument, Object overwriteexisting, Object Webusername, Object WebPassword);
Saveasdocument the file name to save
overwriteexisting if the file already exists overwrite
Webusername password protection account set by word
WebPassword password protection password set by word
DSO framer Control Object operation Word file