Problem with VBA Code for Massive Publish

R

Rod Gill

Reading Help, set the WSSURL parameter to NULL.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Rod:

OK. Not pretty... mind you, I'm not giving up on VBA, but, seeing as
I've already tried the pretty approach with VBA, to no avail: i.e. the
Publish windows keeps appearing, and I can't "click" on it's
"Publish" button through VBA (see code above)...

....How would you use from VBA the Project.QueuePublish method to
publish a project without creating any workspace, merely publishing
the project from it's current draft version?

Awaiting your kind reply,

Sebastián Armas
Project Manager
 
I

Incanus

Rod:

This is sort of a reprint of a previous post, but... Here's my current
code, wich is running in a separate MPP file, not in
the global, mind you. I call de Publicacion_Normal() sub that then
calls the Publica() ...and the pop up is still there. Any suggestions?

Sub Publica()
'Se publica la Gantt
DisplayAlerts = False
Publish Republish:=Null, WssUrl:=Null
DisplayAlerts = True
End Sub

Sub Publicacion_Normal()
' Publicacion_Normal
' Macro grabada el vie 8/14/09 por BANCO\sarmas.
' Iterador en base a lista de tareas para publicación de Gantts en
Project Server

Dim Tarea As Task
Dim Gantt As String

' Se itera en la lista de tareas
' cada tarea tiene el nombre de una Gantt de Project Server a Publicar
For Each Tarea In ActiveProject.Tasks

' Se crea el string de carga de la Gantt
Gantt = "<>\" & Tarea.Name

' Se abre la Gantt de Project Server
FileOpenEx Name:=Gantt, ReadOnly:=False

'Se graba previo a la publicación
FileSave

'Se publica la Gantt
Call Publica

'SendKeys "{ENTER}"

TiempoPausa = 20 ' Asigna hora de inicio.
Inicio = Timer ' Establece la hora de inicio.
Do While Timer < Inicio + TiempoPausa
DoEvents ' Cambia a otros procesos.
Loop

'Se cierra la Gantt sin cambios y protegida
FileClose Save:=pjDoNotSave, NoAuto:=True

Next Tarea

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top