简体   繁体   English

使用Excel VBA在项目上发布

[英]Publish on Project using Excel VBA

I need to publish Project plans from a list. 我需要从列表中发布项目计划。

All the code is done and running. 所有代码都已完成并正在运行。

.Publish Republish:=Null, WssUrl:=Null

'Store timer
dblTimer = Timer
'Pause 5 seconds to allow publish window to appear
Do While dblTimer + 30 > Timer

     DoEvents

Loop
'Enable publish
SendKeys "{ENTER}"

The publish window pops on Project. 发布窗口将在Project上弹出。 The VBA stops until I click on publish in the window, which has to be done with the SendKeys. VBA停止,直到我单击窗口中的发布为止,这必须使用SendKeys完成。

Is there a way to publish without popping the window, or making VBA run when the window pops? 有没有一种方法可以在不弹出窗口的情况下发布,或者在窗口弹出时使VBA运行?

您需要添加一行,并使用的FileSave方法首先然后发布项目计划enterenter Application.FileSave Application.Publishp真,空

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM