Recently, I was working on a secondary development project in Visio. I encountered a file storage problem, that is, I could not use save for data storage. After reading the relevant materials, I finally found the answer to the question. Reference: http://msdn.microsoft.com/zh-cn/library/aa168480 (V = office.11). aspx # EIGA
(1)SRCTo load the document to the control. For example, the following C # example shows how to load a Visio drawing:
Drawingcontrol. src = "C: \ Drawing. Sealing ";
AvailableSRCProperty to load any Visio file type (for example,. sealing,. vdx,. VST, or. SVG ). This file can be stored locally or on a remote file server. The
SRCThe property is loaded inSRCValue. To save the changes in the control document, you must use
SaveasTo save the Visio Document. Alternatively, you can save the changes in the stream. However, in both casesSRCThe original document loaded by the property.
(2) The control is loadedSRCCopy of the file specified by the property. Files loaded through SRC cannot be used for read/write operations, so they cannot be used.
SaveMethod. To save the changes to the document loaded in the Visio Drawing Control, callSaveasMethod. The following C # example shows how to use
DocumentAttribute to callSaveasMethod:
Visio. Document document = drawingcontrol. Document; document. saveas ("C: \ Drawing. Sealing ");
You cannot useSaveasexMethod: Save the Visio 2003 document to the Visio 2002 format in the Visio ActiveX control. To save the drawing loaded in the Visio drawing control to the Visio 2002 format, start an invisible instance of Visio and applyProgramInstance call
SaveasexMethod, like Visual Basic 6.0CodeThis code saves the Visio 2003 drawing to the Visio 2003 file format:
Application. Documents (1). saveasex ("C: \ Documents and Settings" & _ "\ myusername \ My Documents ents \ visio2002 file. Sealing", vissaveasws + _ vissaveaslistinmru)