en / fr

myLittleWriter

Exemple ASP

Instructions

On suppose dans cet exemple que le fichier composant (.wsc) et le fichier .asp se trouvent dans le même dossier.

Exemple ASP/VBScript

<%
   Response.ContentType = "application/msword"
 
   Dim mlwObj
   Set mlwObj = GetObject("script:" & Server.MapPath(".\myLittleWriter.wsc"))
 
   With mlwObj
     .mlw_doc_DefaultLang = 1033
     .mlw_info_Title = "myLittleWriter Sample"
 
     .mlw_page_LeftMargin = 750
     .mlw_page_RightMargin = 750
     .mlw_page_TopMargin = 750
     .mlw_page_BottomMargin = 750
 
     .addHeader "<DATE \@ ""MMMM, dd yyyy"">", "right", "Arial", 8
     .addFooter "(c) 2000-2002, myLittleTools.net.", "centered", "Arial", 8
 
     .addHTML "Dear Sir,<P>Thank you for downloading the freely licensed <B>myLittleAdmin for SQL Server and MSDE</B> software."
     .addHTML "<P>myLittleAdmin is the most advanced and robust web-based MS SQL and MSDE database administration tool. It is intended to handle the administration of SQL Server and MSDE databases over the WWW. It allows you to fully manage your databases even when you don't want or cannot use MS Enterprise Manager. <I>With myLittleAdmin, you will do through a browser almost everything you did before with Enterprise Manager.</I>"
     .insertImage "c:\screenshot.jpg", "jpg"
 
     Response.Write .createRTFDocument()
   End With
 
   Set mlwObj = Nothing
   Response.End
%>