Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I just want to say how much I value your site. I hope the good work keeps up there. It's really helped me..."

Geography

Where in the world do Tek-Tips members come from?

Need script to automatically publish a document

ChrisOjeda (Programmer)
23 Apr 03 15:57
Hi,

I'd like to run a VBA script in Access to automatically publish a document.  Does anyone have a script?
ChrisOjeda (Programmer)
24 Apr 03 19:50
Can someone please give me some direction on this matter?
usersgman (MIS)
29 Apr 03 16:42
Through my travels I came across this incredible code that someone has developed that harnesses Event Sinks in Exchange Type stores (web storage systems like Sharepoint). It waits for the Event to occur, such as a document being put into a web folder and then it takes the document and automatically publishes it! Wow! It can be found here, I would read the information a few times to really get the gist of it and grasp the concept, that is what i had to do! http://www.ictbrothers.com/spspublisher/

I know you were looking for a vbscript to run in Access but I thought this might be of some help or maybe you could borrow from it. Everything is done within Sharepoint and you modify the COM+ settings.

If I find something that is only Access related I will post it for you.

GMAN
ChrisOjeda (Programmer)
29 Apr 03 17:35
Thanks...it looks pretty good... Chris
bsimser (Programmer)
22 May 03 5:19
Here's some vb script I wrote (just off the top of my head so check for errors) that will publish a document. Just call it with a URL to the document you want to publish. Save this code to a file (e.g. publish.vbs) or put it into your DashboardExtensions.vbs and use it in a webpart.

Example:
publish.vbs http://server/workspace/documents/mydoc.doc


'
' Given a URL to a document (http://server/workspace/Documents/mydoc.doc)
' publish a document. Assumes document is checked in.
'
Sub PublishDocument(urlDoc)

        Dim objDoc
        Dim objVersion

        Set objDoc = CreateObject("CDO.KnowledgeDocument")
        objDoc.DataSource.Open urlDoc

        Set objVersion = CreateObject("CDO.KnowledgeVersion")

        ' Publish the document
'       WScript.Echo "Publishing " & objDoc.Fields("RESOURCE_PARSENAME")
        objVersion.Publish objDoc

        ' Cleanup memory
        Set objDoc = Nothing
        Set objVersion = Nothing

End Sub

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close