|File as String||
A String expression that indicates the name of the file to be saved. If present, the CopyTo property retrieves True, if the operation
succeeded, else False it is failed. If the File parameter is missing or empty,
the CopyTo property retrieves an one dimension safe array of bytes that contains
the EMF content.
If the File parameter is not empty, the extension ( characters after last dot ) determines the graphical/ format of the file to be saved as follows:
For instance, the CopyTo("c:\temp\snapshot.png") property saves the control's content in PNG format to snapshot.png file.
|Variant||A boolean expression that indicates whether the File was successful saved, if the File parameter is not empty, or a one dimension safe array of bytes, if the File parameter is empty string.|
• Built-in scaling information
• Built-in descriptions that are saved with the file
• Improvements in color palettes and device independence
The EMF format is an extensible format, which means that a programmer can modify the original specification to add functionality or to meet specific needs. You can paste this format to Microsoft Word, Excel, Front Page, Microsoft Image Composer and any application that know to handle EMF formats.
The following VB sample saves the control's content to a EMF file:
If (Control.CopyTo("c:\temp\test.emf")) Then MsgBox "test.emf file created, open it using the mspaint editor." End If
The following VB sample prints the EMF content ( as bytes, File parameter is empty string ):
Dim i As Variant For Each i In Control.CopyTo("") Debug.Print i Next