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

[µo°Ý] ½Ð°Ý¥i§_ ´¡¤J¹ÏÀɮɥi¥H§k¦XÀx¦sÄæ¦ì¤j¤p

¥»©«³Ì«á¥Ñ justinbaba ©ó 2014-10-30 14:21 ½s¿è
¦^´_  justinbaba
GBKEE µoªí©ó 2014-10-29 19:14


Dear GBKEE ¤j

§Ú¤ñ¸û ±`¥Îªº³W«h ³£¬O  §ì¹q¸£ D:\PIC
©Î¬O§ì FB ¤W¯»µ·¹Îªº·Ó¤ù ¦p.  
https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-xfa1/v/t1.0-9/10606582_848432645189022_612134465661955873_n.jpg?oh=72c345140a00525c75d0b30adafc29db&oe=54E93E5E&__gda__=1425326606_ac6b4e067fc55726650a4dd598d05494

TOP

¦^´_ 11# justinbaba
§ì¹q¸£ D:\PIC ¥i°Ñ¦Ò ³o¸Ìªº²Ä 5 ©«  

Google ®a ¹Ï¤ùªº½d¨Ò
  1. Option Explicit
  2. Sub Ex_ºô­¶¤U¸ü·Ó¤ù()
  3.     Dim i As Integer, E As Object, P As Picture, Sh As Worksheet, MaxWidth As Single
  4.     Set Sh = ActiveSheet      '«ü©w¤u§@ªí
  5.     Sh.Pictures.Delete        '§R°£©Ò¦³ªº·Ó¤ù
  6.     With CreateObject("InternetExplorer.Application")
  7.         .Visible = True
  8.         .Navigate "https://www.google.com/search?tbm=isch&hl=zh-TW&source=hp&q=%E5%AE%B6&gbv=2&oq=%E5%AE%B6&gs_l=img.12...0.0.0.1844.0.0.0.0.0.0.0.0..0.0....0...1ac..34.img..0.0.0.9S-XuJpg9JY"
  9.         '.Navigate «ü©wªººô­¶¦³·Ó¤ù
  10.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  11.         With .Document
  12.             For Each E In .all
  13.                If UCase(E.tagname) = "IMG" Then
  14.                     i = i + 1
  15.                     Set P = Sh.Pictures.Insert(E.href) 'ª«¥ó(¤u§@ªí¤W·s¼W·Ó¤ù)
  16.                     With Sh.Cells(i, "a")               '«ü©wªºÀx¦s®æ
  17.                         P.Top = .Top                    '·Ó¤ùªº¥k¤è¦b¤u§@ªí¤Wªº¦ì¸m
  18.                         P.Left = .Left                  '·Ó¤ùªº¥k¤è¦b¤u§@ªí¤Wªº¦ì¸m
  19.                         .RowHeight = IIf(P.Height >= 409, 409, P.Height)        '½Õ¾ãÀx¦s®æ°ª«×=>·Ó¤ùªº°ª«×
  20.                         P.Height = IIf(P.Height >= 409, 409, P.Height)          '½Õ¾ãÀx¦s®æ°ª«×=>·Ó¤ùªº°ª«×
  21.                         If MaxWidth < P.Width * (.ColumnWidth / .Width) Then    '¤U¸ü·Ó¤ùªº³Ì¤j¼e«×
  22.                             MaxWidth = P.Width * (.ColumnWidth / .Width)
  23.                             .ColumnWidth = P.Width * (.ColumnWidth / .Width)    '½Õ¾ãÀx¦s®æÄæ¼e=>·Ó¤ùªº¼e«×
  24.                         End If
  25.                     End With
  26.                 End If
  27.             Next
  28.         End With
  29.         For Each P In Sh.Pictures
  30.             P.Width = Sh.Cells(i, "a").Width  '½Õ¾ã©Ò¦³ªº·Ó¤ù¼e«×¤@­P
  31.         Next
  32.         .Quit        'Ãö³¬ºô­¶
  33.     End With
  34. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2014/10/31 17:10): ¤W¶ÇÀɮ׬ݬÝ

ÁÂÁ §ìD: ªº§Ú¦A²¾¥h ¨º­Ó°Q½×¦ê~~

¦Ó§Ú·Ó±z»¡ªº¤è¦¡¥h°õ¦æ~~ ¸õ¥X¤F¤@­Ó°T®§ "À³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~"  ¬O§_§Ú¦³¨ºÃä¨S°õ¦æ¹ï¶Ü¡H

¨Ã¥B·Qª¾¹D~~ ¬O§_¦³¾÷·|§ì FB ¸ÌÀYªº·Ó¤ù ¡A¦Ó¥B¥i¥H¶K¦h±i¤£¦Pªº·Ó¤ù¨ì¦Û¤v«ü©wªºÄæ¦ì..



¤£¦n·N«ä~~ °ÝÃD«Ü¦h¡A½Ð¦h¥]§t @@

TOP

ÁÂÁ §ìD: ªº§Ú¦A²¾¥h ¨º­Ó°Q½×¦ê~~

¦Ó§Ú·Ó±z»¡ªº¤è¦¡¥h°õ¦æ~~ ¸õ¥X¤F¤@­Ó°T®§ "À³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº ...
justinbaba µoªí©ó 2014-10-31 16:26


Test for ¹Ï¤ù´¡¤J.zip (14.64 KB)
Àɮפw¤W¶Ç¡AÁÂÁÂ..

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD