Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Query SharePoint Site for Existing Pages Content Type

I would like to enter a SharePoint URL in cell A1, and use a macro to
retrieve a list of Content Types = 'basic page' (with it's keywords column)
found under that URL. Has anyone seen anything like that - or can you point
me to where I might find that?

Thank you for your help in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro to Query SharePoint Site for Existing Pages Content Type

I have lots of VBA macros that open an IE explorer window and download data
from a URL. Is the sharepoint a webpage or a database? If you can provied a
URL that would help.

It seem like yyou have some sort of table. Webpages have multiple tables
and it is sometimes tricky in identify the correct table. What soemtimes
help is to perform a webquery to identify the corect table. You can use the
worksheet menu

Data - Import External Data - Import Data - New Webquery.

Yo can even record a macro while performing the operation to get a macro
that may help. Here is a simple macro that uses the IE explorer.

Sub GetZipCodes()


ZIPCODE = InputBox("Enter 5 digit zipcode : ")

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

URL = "http://zip4.usps.com/zip4/citytown_zip.jsp"

'get web page
IE.Navigate2 URL
Do While IE.readyState < 4 And _
IE.busy = True

DoEvents
Loop

Set Form = IE.document.getElementsByTagname("Form")

Set zip5 = IE.document.getElementById("zip5")
zip5.Value = ZIPCODE


Set ZipCodebutton = Form(0).onsubmit

Form(0).submit
Do While IE.busy = True
DoEvents
Loop

Set Table = IE.document.getElementsByTagname("Table")
Location = Table(0).Rows(2).innertext
IE.Quit
MsgBox ("Zip code = " & ZIPCODE & " City/State = " & Location)


End Sub



"girlgeek101" wrote:

I would like to enter a SharePoint URL in cell A1, and use a macro to
retrieve a list of Content Types = 'basic page' (with it's keywords column)
found under that URL. Has anyone seen anything like that - or can you point
me to where I might find that?

Thank you for your help in advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Sharepoint site & Determine the number of files and their nam Chilidog Excel Programming 1 June 12th 09 01:18 AM
Accessing Excel Documents on a SharePoint Site ExcelMonkey Excel Programming 2 March 23rd 09 02:58 PM
Having problems saving pdf's from excel to a sharepoint site. Ben H. Excel Programming 2 October 16th 07 05:24 AM
Possible to import data from spreadsheets on sharepoint site? Sharepoint newbie Excel Discussion (Misc queries) 0 July 2nd 07 02:14 PM
Can a Macro open workbooks on a SharePoint Site? Randy Excel Discussion (Misc queries) 0 August 29th 06 07:21 PM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"