+ Reply to Thread
Results 1 to 2 of 2

Automatic Catalog

  1. #1
    Registered User
    Join Date
    05-19-2009
    Location
    Virgin Land, Near Phantasia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Question Automatic Catalog

    Hi all! Long time no see

    So here is my question: Is it possible to write a VBA code to

    1. Copy a description from a cell to browser
    2. Search on Google images.
    3. Download the first three images and place them in neighboring cells to that description. (A1: Baby Potatoes; A2: Image of Baby Potatoes; A3: 2nd Image of Baby Potatoes; A4: 3rd Image of Baby Potatoes)

    It is basically an automatic image finder for a catalog =)

    P.S. or is there a program to do that already in existence?

    Cheerio!

    Update:


    Here is what i got so far:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    'search google providing the selected range
    Call GoogleSearch(Target)

    End Sub

    Module holds the search code so that it can be used by other worksheets

    'list of constants
    Const GOOGLE_SEARCH_URL As String = "http://images.google.com/images?q="

    Public Sub GoogleSearch(ByRef Target As Range)
    Dim sGoogleSearchURL As String
    Dim oIE As Object

    'restrict to particular column and only one cell selected
    If Target.Column = 1 And Target.Cells.Count = 1 Then

    'check if the cell is populate with some text
    If Len(Trim(Target.Value)) > 0 Then

    'create IE new window
    Set oIE = CreateObject("InternetExplorer.Application")

    'set IE to be visiable
    oIE.Visible = True

    'go to Google URL
    oIE.Navigate GOOGLE_SEARCH_URL & Trim(Target.Value)

    End If

    End If
    End Sub

    Update 2:


    Image insert:

    Sub AddImage()
    Dim thePix As Shape
    Dim imageURL As String
    Dim wks As Worksheet
    Dim pasteBelowCell As Range
    Set wks = ThisWorkbook.Sheets(1)
    Set pasteBelowCell = wks.Range("D8")
    imageURL = "http://www.gap.com/resources/productImage/v1/770868002/
    P01"
    For Each thePix In wks.Shapes
    thePix.Delete
    Next thePix
    Set thePix = wks.Shapes.AddShape(msoShapeRectangle,
    pasteBelowCell.Offset(2).Left, _
    pasteBelowCell.Offset(2).Top, 120, 140)
    Application.DisplayAlerts = False
    On Error Resume Next
    thePix.Fill.UserPicture imageURL
    On Error GoTo 0
    Application.DisplayAlerts = True
    End Sub

    Now, how to merge the two codes..
    Last edited by defy; 02-27-2014 at 08:23 AM.

  2. #2
    Registered User
    Join Date
    05-19-2009
    Location
    Virgin Land, Near Phantasia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Automatic Catalog

    No one can help me or did i confuse people?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Catalog
    By DTPB87 in forum Excel General
    Replies: 2
    Last Post: 05-22-2013, 07:04 AM
  2. Simple Catalog selection
    By dremsen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 10:24 PM
  3. Creating a Catalog from a list
    By karthikmg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2007, 09:35 AM
  4. Catalog values
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 08-29-2005, 08:05 PM
  5. [SOLVED] Grouping entries in a catalog
    By Helen McClaine in forum Excel General
    Replies: 1
    Last Post: 05-10-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1