Devi usare OLE... [B]DI conseguenza per Excel un esempio :[/B] Set XA = CreateObject("Excel.Application") Add a New Workbook, and get a handle to the active Worksheet: Call XA.Workbooks.Add Set XW = XA.ActiveSheet XA.ActiveWindow.Zoom = 75 Add some page setup stuff: XW.PageSetup.PrintTitleRows = "$1:$3" XW.PageSetup.PrintTitleColumns = "" XW.PageSetup.LeftHeader = "" XW.PageSetup.CenterHeader = "" XW.PageSetup.RightHeader = "" XW.PageSetup.LeftFooter = "Some Text here" XW.PageSetup.CenterFooter = "Page &P" XW.PageSetup.RightFooter = "&D" XA.Visible = True Put something in a cell: XW.Range("A3").value = "No" Put something in a computed cell: rownumber=4 XW.Range("B" & rownumber).value = doc.form(0) Format a range of cells: XW.Range("A4:J"& rownumber).Select XA.Selection.HorizontalAlignment = xlLeft XA.Selection.VerticalAlignment = xlTop XA.Selection.WrapText = True XA.Selection.Orientation = 0 XA.Selection.ShrinkToFit = False XA.Selection.MergeCells = False XA.Selection.Borders.LineStyle = 1 XA.Selection.Borders.Weight = 2 [B]per Word un\'altro[/B] \'Get hangle of word object Set wordobj = CreateObject ("Word.Application") \' open document and show application wordobj.Documents.Add wordobj.Visible = True wordobj.Activate \' Add text to ms word wordobj.selection.TypeText "[Notes]" & Chr(10) wordobj.selection.TypeText "KitType=1" & Chr(10) wordobj.selection.TypeText "SharedDataDirectory=C:\Documents and Settings\All Users\Application Data\Lotus\Notes\Data\Shared" & Chr(10)
Daniele Grillo - Fondatore di Dominopoint.it
|