+ Reply to Thread
Results 1 to 5 of 5

Set Sharepoint Document property via VB

  1. #1
    Registered User
    Join Date
    04-26-2011
    Location
    Torrance, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Set Sharepoint Document property via VB

    Is there a way to set a document property for a file that is stored on a sharepoint server using VB code? I can set it manually, but can't find (or record) the code to do it.

    Manual steps are: Office Button-Prepare-Document Properties
    The column I created on Sharepoint shows up under "Document Properties - Server"

    I want to set the value of this field programatically.

  2. #2
    Registered User
    Join Date
    12-05-2006
    Posts
    81

    Re: Set Sharepoint Document property via VB

    Yoam69
    Did you get a Answer? I am tring to do the same thing.

  3. #3
    Registered User
    Join Date
    04-26-2011
    Location
    Torrance, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Cool Re: Set Sharepoint Document property via VB

    Yes, I did. Here a bit of code I used that did the trick:

    Please Login or Register  to view this content.
    The key is the collection called ContentTypeProperties. The names of those properties correspond to the names
    listed in the properties of your sharepoint document. In my case, the ones I'm setting are "Brand", "Description", "Complete Date", "Assigned To" and "Eng Comp Date". I'm setting them to the value of a range in my workbook, but you could just as easily set them to the value of a variable in your code or a hard coded string.

    Hope this help...I've gotten a lot of mileage out of the technique.
    Last edited by jeffreybrown; 09-14-2012 at 02:26 PM.

  4. #4
    Registered User
    Join Date
    12-05-2006
    Posts
    81

    Re: Set Sharepoint Document property via VB

    Thanks alot I will give it a try

  5. #5
    Registered User
    Join Date
    12-05-2006
    Posts
    81

    Re: Set Sharepoint Document property via VB

    Untitled.png
    This the error I keep getting

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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