Export to PDF and CSS

Windows Forms User's Guide > Howto: Work With Files

PDF and CSS formats require special attention, as they can be saved to, but not loaded from. The problem is that if you save a file as PDF, you cannot load it back in for further editing. CSS will not even save the text contained in a document, but only the formatting.

The best way to circumvent this is to create a seperate Export... menu item in addition to Save and Save As..., and keep the document in its original format when exporting it to a non-editable format. Note that, unlike Save As..., Export... does not change the file name and type.

private void mnuFile_Export_Click(object sender, System.EventArgs e)
[Visual Basic]
Private Sub mnuFile_Export_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_Export.Click
End Sub