+ Reply to Thread
Results 1 to 4 of 4

Getting Meta Tags,

  1. #1
    Registered User
    Join Date
    05-26-2004
    Posts
    7

    Getting Meta Tags,

    Im trying to extract the keywords tag thru some vb code

    Reading another example on here I can extract the title,
    but id like to get the keywords and description etc....

    Cll.Offset(, 1).Value = IE.document.Title is the code that gets the title, but how could i extract the keywords

    Anyone got any ideas?

    Cheers ezy

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667
    Sub Keywords()
    MsgBox ActiveWorkbook.BuiltinDocumentProperties("keywords")
    End Sub
    Best regards,

    Ray

  3. #3
    Registered User
    Join Date
    05-26-2004
    Posts
    7
    Thanks for your help,

    When i was meaning keywords I was meaning from the webpage meta tags,

    IE.document.Title gets the Title of the page, but I have no idea how i can specifiy say the keywords or description tags....

    Cheers

  4. #4
    Registered User
    Join Date
    05-26-2004
    Posts
    7
    ive found this code,

    function getKeywords () {
    var metaElements = document.all ?
    document.all.tags('META') :
    document.getElementsByTagName ?
    document.getElementsByTagName ('META') : new Array();
    var metaKeywords = new Array();
    var i = 0;
    for (var m = 0; m < metaElements.length; m++)
    if (metaElements[m].name == 'keywords')
    metaKeywords[i++] = metaElements[m].content;
    return metaKeywords;
    }

    but thats for inside a html page, could it be used in excel vb? would it need changing slightly?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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