vba ¦p¦óÂ^¨úÃöÁä¦rªº¾ãÓ¬q¸¨(¥]§t®æ¦¡)¨ì·sªºword¤å¥ó
- ©«¤l
- 2
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 4
- ÂI¦W
- 0
- §@·~¨t²Î
- win 8
- ³nÅ骩¥»
- win8
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-11-25
- ³Ì«áµn¿ý
- 2014-11-28
|
vba ¦p¦óÂ^¨úÃöÁä¦rªº¾ãÓ¬q¸¨(¥]§t®æ¦¡)¨ì·sªºword¤å¥ó
¦p¦óÂ^¨ú¤å¦r(¥]§t®æ¦¡Ãþ¦üwordª½±µ½Æ»s¥Hµ{¦¡§e²{)
¥H¤U¬O§Ú¦bºô¸ô¤W´M§ä¨ìªº¤@ӫܼF®`ªºVBA
Sub ´M§ä()
Set myRange = ActiveDocument.Content
§äÔ£ = InputBox("§äÔ£?")
§ä¨ì = myRange.Find.Execute(§äÔ£)
Do While §ä¨ì
¥´¥] = ¥´¥] & myRange.Paragraphs(1)
myRange.EndOf wdParagraph
§ä¨ì = myRange.Find.Execute(§äÔ£)
Loop
If IsEmpty(¥´¥]) Then MsgBox "§äµL!": Exit Sub
Documents.Add: Selection = ¥´¥]
End Sub
¥Lªº¥\¯à¥u¯à¥]§t¨ã¦³ÃöÁä¦rªº(1)¨º¤@Ó¬q¸¨(2)®æ¦¡¶È¯àÀx¦s¯Â¤å¦r
(1)§Ú·Q®Ø¦í¥¦¥H¤Uªº¨âÓ¬q¸¨(©ÎªÌ¬O¥i¥H§âì¤åªº¤TÓ¬q¸¨·í¦¨¤@Ó¬q¸¨¬Ý)
(2)Àx¦sªº®ÉÔ§Ú·Q¥]§t©Ò¦³ªº®æ¦¡¼Ë¦¡(Ãþ½Æ»s)
:P
«ô°U¦UÓ¥O¤H·q¨Øªº°ª¤â §Ú¯uªº«Ü»Ýn
¥ýÁÂÁ¦U¦ì¤F |
|
|
|
|
|
|