没办法以编程方式Excel工作簿签入Powerpoint
问题说明
我有一个问题已经解决了好几个星期,用尽了我所有的可用资源.
我正在工作的工作簿中有一个宏.该宏签出另一个电子表格(我要对其进行更改),然后应将其签回.当我运行宏时,它签出文件并打开它.然后,它进入签入子例程,但失败,并显示消息运行时错误1004,对象"_Workbook"的方法"CheckIn"失败.我尝试完全限定签入,但结果相同.下面宏中的代码.
任何帮助将不胜感激,因为我完全不知所措!
迈克
I have a problem that I have been working on for several weeks, exhausting all resources I have available.
I have a macro in the workbook that I am working in. The macro checks out a different spreadsheet (that I will want to make changes to) and then should check it back in. When I run the macro, it checks out the file and opens it. It then proceeds to the checkin subroutine, but fails with the message run-time error 1004 "Method ''CheckIn'' of object ''_Workbook'' failed. I tried fully qualifying the checkin, but have the same results. I am including the code from the macro below.
Any assistance would be greatly appreciated, as I am totally stumped!
Mike
Option Base 1
Public wb0 As Workbook
Public xlFile0 As String
Public FileName0 As String
Sub Automation_Vetting_Process()
xlFile0 = "http:// ..." 'Actual SharePoint URL
CheckoutFile (xlFile0)
FileName0 = wb0.Name
CheckinFile (FileName0)
End Sub
Sub CheckoutFile(FileName As String)
' Determine if workbook can be checked out
If Application.Workbooks.CanCheckOut(xlFile0) Then
Application.Workbooks.CheckOut xlFile0
Set wb0 = Application.Workbooks.Open(xlFile0)
MsgBox wb0.Name & " is checked out to you."
Else
MsgBox "You are unable to checkout the at this time."
End If
End Sub
Sub CheckinFile(FileName As String)
' Determine if workbook can be checked in
If Application.Workbooks(FileName).CanCheckIn = True Then
Application.Workbooks(FileName).CheckIn SaveChanges:=True, Comments:="", MakePublic:=False
MsgBox FileName & " was checked in."
Else
MsgBox "You are unable to checkin the " & FileName & " spreadsheet at this time."
End If
End Sub
正确答案
对于这则帖子的标题不正确,我深表歉意.应该是无法以编程方式将Excel工作簿签到Sharepoint.
I apologize for the incorrect title of this post. It should have been "Cannot programatically checkin Excel workbook to Sharepoint.
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcgaejk
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20