excel¶}±Òword¶ñ¤J¬ÛÃö¸ê®Æ
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-10 05:34 ½s¿è
¦^´_ 3# y663258
§Únªº¥u¬O§ä¥X¤@µ§¦b"¦¨ªG³ø§i.doc"²Ä¤@¶¶ñ¤J¬ÛÃö°ò¥»¸ê®Æ
¸Õ¸Õ¬Ý
§A 1# ªþÀÉ ªí³æªºµ{¦¡½X ´M§ä:¨¥÷ÃÒ¦r¸¹- Dim Rng As Range
- Private Sub TextBox1_Change()
- If Trim(TextBox1) <> "" Then '¥h°£¨â®ÇªÅ¥Õ¦r¤¸«áªºTextBox1
- Set Rng = Sheets("SHEET1").Range("a:a").Find(Trim(TextBox1), LOOKAT:=xlWhole)
- ' .Range("a:a") ´M§ä:¨¥÷ÃÒ¦r¸¹
- If Not Rng Is Nothing Then
- If MsgBox(TextBox1 & vbLf & "¦L¦C?", vbYesNo, "¦¨ªG³ø §i") = vbYes Then Ex
- End If
- End If
- End Sub
- Private Sub Ex()
- Dim AR, i As Integer
- AR = Array("¦¨ªG³ø §i", "H", "B", "D", "A", "I", "J", "K")
- 'ªíÀY¦UÄæ¦ì¶µ¥Ø¦r¦ê¶¡¹j½Ð¦Û¦æ½Õ¾ã»PÅã¥Ü¦b "¦¨ªG³ø §i.DOC,ªº¦r¦ê¶¡¹j¤@P
- For i = 1 To UBound(AR)
- AR(i) = Cells(1, AR(i)) & " : " & Rng.Cells(1, AR(i))
- '¾É¤J ¨CÄæ¦ìªºªíÀY&":"&¦r¦ê(¤º®e)
- Next
- With CreateObject("WORD.APPLICATION")
- .Visible = True
- .Documents.Open "d:\¦¨ªG³ø §i.doc"
- With .ActiveDocument
- .Range(.Range.Start, .Range.End).Text = Join(AR, vbLf)
- With .Range
- .Font.Size = 16
- .ParagraphFormat.Alignment = 0 'wdAlignParagraphLeft '¾a¥ª
- With .Paragraphs(1).Range
- .Font.Size = 24
- .ParagraphFormat.Alignment = 1 ' wdAlignParagraphCenter '¦Ü¤¤
- End With
- End With
- .PrintOut '¦L¦C
- .Close
- End With
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 7# y663258
¸Õ¸Õ¬Ý- Private Sub Ex()
- Dim AR, i As Integer
- AR = Array("¦¨ªG³ø §i", "H", "B", "D", "A", "I", "J", "K")
- 'ªíÀY¦UÄæ¦ì¶µ¥Ø¦r¦ê¶¡¹j½Ð¦Û¦æ½Õ¾ã»PÅã¥Ü¦b "¦¨ªG³ø §i.DOC,ªº¦r¦ê¶¡¹j¤@P
- For i = 1 To UBound(AR)
- AR(i) = Cells(1, AR(i)) & " : " & Rng.Cells(1, AR(i))
- '¾É¤J ¨CÄæ¦ìªºªíÀY&":"&¦r¦ê(¤º®e)
- Next
- With CreateObject("WORD.APPLICATION")
- .Visible = True
- .Documents.Open "d:\¦¨ªG³ø §i.doc"
- With .ActiveDocument
- For i = 0 To UBound(AR)
- If i + 1 > .Paragraphs.Count Then .Paragraphs.Add
- With .Paragraphs(i + 1).Range
- .Text = AR(i) & vbLf
- .Font.Size = IIf(i = 0, 24, 16)
- .ParagraphFormat.Alignment = IIf(i = 0, 1, 0)
- End With
- Next
- .PrintOut '¦L¦C
- .Close True '¦sÀÉ
- End With
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|