ChrisOjeda
Programmer
Hi,
I'd like to run a VBA script in Access to automatically publish a document. Does anyone have a script?
I'd like to run a VBA script in Access to automatically publish a document. Does anyone have a script?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'
' Given a URL to a document ([URL unfurl="true"]http://server/workspace/Documents/mydoc.doc)[/URL]
' 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