ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

wordªºvba, ­n«ç»ò§ïÂà¨ìexcel«áªº¦r«¬¤Î®æ¦¡

wordªºvba, ­n«ç»ò§ïÂà¨ìexcel«áªº¦r«¬¤Î®æ¦¡

½Ð°Ý¤@¤U,¥H¤U¬°wordªºvba, ­n«ç»ò§ïÂà¨ìexcel«áªº¦r«¬¤Î®æ¦¡(®æ½u,¸m¤¤µ¥....)
Sub test()
    Dim xlWkApp As Object, xlWk As Object
    Set xlWkApp = CreateObject("excel.application")
    With xlWkApp
        .Visible = True
        Set xlWk = .Workbooks.Add
        xlWk.Sheets(1).Range("a1") = ThisDocument.Tables(2).Cell(2, 6)
        xlWk.Sheets(1).Range("a2") = ThisDocument.Tables(2).Cell(5, 6)
        End With
End Sub
ªì¾ÇªÌcolor

©M¦bExcel¨½¬O¤@样ªº¡G
Sub test()
    Dim xlWkApp As Object, xlWk As Object
    Set xlWkApp = CreateObject("excel.application")
    With xlWkApp
        .Visible = True
        With .Workbooks.Add.Sheets(1)
            With .Range("a1")
                .Value = ThisDocument.Tables(2).Cell(2, 6)
                .Font.ColorIndex = 3
                .HorizontalAlignment = 3
            End With
            .Range("a2") = ThisDocument.Tables(2).Cell(5, 6)
            .Range("a1:a2").Borders.LineStyle = 1
        End With
    End With
End Sub

TOP

¦^´_ 2# et5323


    ³á~­ì¨Ó¦p¦¹,¤§«e³£¥Î¿ý»s¦A¶K¹L¨Ó³£¤£¯à¥Î,¤S¾Ç¨ì¤F~·P®¦^^
ªì¾ÇªÌcolor

TOP

¥t¥~¦A°Ý¤@­Ó°ÝÃD,¬°¤°»òÂনEXCEL«á¤£¯à¶i¦æ¹Bºâ? ·|¥X²{#VALUE!
¬O¦]¬°Â৹¬O¤å¦r¶Ü?¥i¬O¦b®æ¦¡³¡¥÷§ï¦¨¼Æ­È¤]µLªk¹Bºâ,¬°¤°»ò?ÁÂÁÂ~
ªì¾ÇªÌcolor

TOP

§Úªºª©¥»¬OOffice2003,wordªí®æ¨½ªº内®e输¤J¨ìexcel¦Z,¥]§t¤F¤@¨Ç«D¥´¦L¦r²Å.§Ú¤W¦¸删ªº¨º个贴¤l对¦¹进¦æ¤F处²z.
Function myCell(s)
    Dim tmp
    tmp = Replace(s, Chr(13), "")
    tmp = Replace(tmp, Chr(7), "")
    tmp = Replace(tmp, Chr(32), "")
    myCell = tmp
End Function
Sub test()
    Dim xlWkApp As Object, xlWk As Object
    Set xlWkApp = CreateObject("excel.application")
    With xlWkApp
        .Visible = True
        With .Workbooks.Add.Sheets(1)
            With .Range("a1")
                .Value = myCell(ThisDocument.Tables(2).Cell(2, 6))
                .Font.ColorIndex = 3
                .HorizontalAlignment = 3
            End With
            .Range("a2") = myCell(ThisDocument.Tables(2).Cell(5, 6))
            .Range("a1:a2").Borders.LineStyle = 1
        End With
    End With
End Sub

TOP

¯uªº¥i¦æ­C~ÁÂÁÂet5323  ^^
1.¤£¹L¨â­Óµ{¦¡¬°¤°»ò¦³³o¼Ëªº®t§O?
2.³o¤@¬qªº¥Î·N¬O?¤£À´
Function myCell(s)
    Dim tmp
    tmp = Replace(s, Chr(13), "")
    tmp = Replace(tmp, Chr(7), "")
    tmp = Replace(tmp, Chr(32), "")
    myCell = tmp
End Function
ªì¾ÇªÌcolor

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD