SaveToVar Method |
[Top] [Chapter] [Previous] [Next] |
Saves to a variant variable Declaration object SaveToVar([In] bool OnlySelection, [In, MarshalAs(UnmanagedType.BStr)] string FormatStr); Description This method saves the contents or the selected text to a variant array of bytes. This method requires less resources than SaveToString.
C# example: object data; data = wpdllInt1.Memo.SaveToVar(false, "");
Returns A variant or "object". The created data is null or an array of bytes!
ASP.NET example: Response.Clear(); // Add new header for RTF Response.ContentType = "application/rtf"; Response.AddHeader("Content-Type", "application/rtf"); Response.AddHeader("Content-Disposition","inline;filename=" + afile + ".rtf"); object buf = wpdllint1.Memo.SaveToVar(false, "RTF"); if(buf!=null) Response.BinaryWrite((byte[])buf); Category |