Need to checkout MS Project file from Excel VBA

I have a VBA Excel macro that can open an MS Project file, and extract data.  It works fine when the MS Project file is on my hard drive or other location where no check out is required.  But often the MPP files I need to access are stored in SharePoint,
in document libraries, that have checkin/checkout enabled.  I am aware of the the way to do this for an Excel file, such as the following code snippet.
 ' Determine if workbook can be checked out.
 If Workbooks.CanCheckOut(Filename:=docCheckOut) = True Then
  Workbooks.CheckOut (Filename:=docCheckOut)
 Else
  MsgBox "You are unable to check out this document at this time."
 End If
I need to be able to do the same thing for MPP files.  Here is the code I have; however, I get a compile error on the CheckOut line, indicating "wrong number of arguments or invalid property assignment".  My research suggests that I should
get this compile error, as it only works on certain collections.  Even the line containing "CanCheckOut", while it does not give me a compile or run time error, it does not return the proper response.
 Dim mpApp As MSProject.Application
 Set mpApp = New MSProject.Application
 AppActivate "Project Professional"
 ' Determine if mpp file can be checked out.     
 If mpApp.CanCheckOut(mppFileToOpen) = True Then
  mpApp.CheckOut (mppFileToOpen)
     Else
         MsgBox "Unable to check out this document at this time."
    End If
Is there a way to checkout an MS Project file stored in SharePoint from within Excel VBA?  Thanks.
Ray

Rod,
Thanks very much.  This was, indeed, the solution.  Don't know how I could have missed this.  
I did run into some issues with ensuring proper object references, checking back in, and being able to handle files that may be on a laptop, SharePoint site with checkout requirements, or SharePoint site without checkout requirements.  Also faced an
issue checking back in; part of my macro opens the MPP file (that is checked out), acquires various pieces of data, then runs a macro in the MPP file that exports data to an excel spreadsheet.  After this macro runs (does a save-as using a map), check
in is no longer possible.  Fortunately, I could checkout the MPP file, open it, get all the required data elements, make a few changes to the MPP file, check it back in (but not close), then run the macro, then close without saving.  In the end,
it all works like a champ.  Thanks very  much for your advice.
Ray

Similar Messages

  • In anticipating upgrading to Premiere Elements 13, I need to know what "gotchas" there might be in loading project files from version 10 (in case someone needs another DVD/Blu-Ray)

    Particularly, can I load project files from version 10 (in case someone needs another DVD/Blu-Ray)

    cbjameson
    What computer operating system is involved?
    There is no guarantee that a project created in an earlier version can be opened in a later one. Many times it can, but...
    If you do try this, then please consider working from a copy of the project 10 project file and then trying to open that in 13/13.1.
    Reason: projects created in an earlier version and then opened and edited in a later version cannot be opened again in the
    earlier version.
    And, there is always the issue of maintaining the connect of the source media with the project file. Is this move from 10 to 13/13.1
    happening on the same computer and are the source media in the same place where they were when they were first imported
    into the 10 project. Disc menus consideration may enter into this depending on your details.
    ATR

  • Acrobat 9.0 Standard. Setting PDF file password from Excel VBA

    Acrobat 9.0 Standard. Setting PDF file password from Excel VBA
    Hi: I am trying to find a call to set the password of a PDF file that I am creating from Excel Workbook using a VBA call.
    I basically have this Excel VBA code that works fine and creates a file.
                pBook.PrintOut Copies:=1, preview:=False, ActivePrinter:="Adobe PDF", _
                               PrintToFile:=True, collate:=True, PrToFileName:=PSFileName
                ' Convert the postscript file to .pdf
                Dim myPDF As PdfDistiller
                Set myPDF = New PdfDistiller     
                myPDF.FileToPDF PSFileName, "", ""
    BUT, I need to set the password on this PDF file and do not see an option to do so.
    Can you provide a solution for this situation? Appreciate your response in advance.
    Thanks.

    There is no way to set password programmatically using any other dll or any other kit?
    I am creating a bunch of PDF files for users programmatically but then they have to go in and set password themselves? This is very inconvenient for users.

  • Problem Creating PDF Files from Excel 2007

    I am running WinXP SP2, Office 2007, and Acrobat v8.1.2. I have an Excel workbook with multiple worksheets. When I was using Excel 2003 I could create a PDF file using five of the six worksheets. Since upgrading to Office 2007 I am unable to create PDF files from Excel. I can create PDF files from Word 2007. When I attempt to use the Acrobat Plug-in to create a PDF I get a message saying the file needs to be saved first. It then attempts to save the file to a strange, somewhat random, file name (e.g. A234G53). When I say OK Excel just hangs and is unresponsive. The way that I can clear it is to stop Excel using Task Manager. I have tried reinstalling Acrobat without successfully solving the problem. Any ideas on how I can diagnose and/or solve the problem?
    Thanks.

    Is your Excel file on a location outside your machine's disk? If so, try copying to local disk.
    Does the Excel file have any protection applied to it? If so, try removing the protection
    If these don't work, can you post a sample file that demonstrates the problem.

  • Flatten a PDF file from Excel

    Flatten a PDF file from Excel
    Is there any way to run a javascript to flatten a PDF document from Excel?
    I’m populating a PDF form from Excel by creating a FDF file, once I finish I need to flatten it.
    Is there any way to accomplish this without having Adobe Acrobat?
    Thank you,
    Luis Gonzalez

    Reader cannot flatten a document, if that's what you're asking. A user with Acrobat installed can, in which case you can use VBA to control Acrobat. For exampe: http://www.khk.net/wordpress/2009/03/04/adobe-acrobat-and-vba-an-introduction/

  • Cannot open Project files from previous FCPX versions

    Hello,
    I'm currently on 10.0.8, and have not upgraded to 10.1.1.  Here is my issue:
    A documentary project I've been working on since 10.0.1 is not showing up in 10.0.8, and I'm wondering how to "manually" update the Project.  I upgraded FCPX versions a few times while working on this Project (I think all the way up to 10.0.4), but then I stopped as I noticed it was negatively affecting parts of my project and making the application run slow (and Apple recommends you don't update versions while in the middle of a project).  I finished that project, but now fast forward and I'm in 10.0.8 and I need to revisit that Project to make a few changes, but FCPX won't even recognize it.  It successfully updated and recognizes the Events I used for this particular Project, but not the Project itself. 
    Any help/suggestions would be great.
    Thank you!

    Thanks Russ.  After all this time, I actually solved the problem myself.  I forgot that back 6 months ago, I renamed my Project file, from the default "CurrentVersion".  I just came across another post that said you're not supposed to do that, so I changed my Project file back to "CurrentVersion" and now FCPX recognizes it.  After all that toil, the answer was just too simple!!
    Thanks.

  • How can  I checkout an existing file from CVS without going through the wiz

    How can I checkout an existing file from CVS, that is not already in my local jdev, without going through the wizard and checkingout everything?

    You can't. AI doesn't produce .PLT files.

  • Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Have CS5 and CS6.  Need to reduce size of file from 6Mb to 2 Mb for contest purposes without losing original

    Just save the document to a new jpeg file name using a lower quality setting or re-size the image down in  size the save a high quality smaller new jpeg image.

  • [svn] 4267: Change path to Assets.swf in eclipse . project file from full hardcoded path to use the FLEX_SDK variable as the base path .

    Revision: 4267
    Author: [email protected]
    Date: 2008-12-09 10:32:36 -0800 (Tue, 09 Dec 2008)
    Log Message:
    Change path to Assets.swf in eclipse .project file from full hardcoded path to use the FLEX_SDK variable as the base path. There is still an issue with Assets.swf not getting referenced correctly. If you import the framework project from Blazeds/trunk into Eclipse and get an error related to Assets.swf or that says "Unable to export SWC oem" for the time being try right clicking on the framwork project in Eclipse and selecting properties. Then in the properties panel, select Flex Library Build Path and then the Assets tab. On the Assets tab, check the check box next to Assets.swf and click Ok. This usually fixes the reference for me.
    Modified Paths:
    blazeds/trunk/development/eclipse/projects/flex/3.0/framework/.project

    Revision: 4267
    Author: [email protected]
    Date: 2008-12-09 10:32:36 -0800 (Tue, 09 Dec 2008)
    Log Message:
    Change path to Assets.swf in eclipse .project file from full hardcoded path to use the FLEX_SDK variable as the base path. There is still an issue with Assets.swf not getting referenced correctly. If you import the framework project from Blazeds/trunk into Eclipse and get an error related to Assets.swf or that says "Unable to export SWC oem" for the time being try right clicking on the framwork project in Eclipse and selecting properties. Then in the properties panel, select Flex Library Build Path and then the Assets tab. On the Assets tab, check the check box next to Assets.swf and click Ok. This usually fixes the reference for me.
    Modified Paths:
    blazeds/trunk/development/eclipse/projects/flex/3.0/framework/.project

  • Camera raw 7.2 will not install within CS5.5, but need it to read nrw files from P7700.

    camera raw 7.2 will not install within CS5.5, but need it to read nrw files from P7700. Besides DNG Converter, what can I do to use files directly?

    Your next option is to upgrade photoshop. If you can't afford the full version (less than $20/month) you could get elements, it uses the latest version of camera raw, but I think it is a stripped down version though.

  • Is there metadata of any kind on an export file that shows me the project file from where it was created?

    Is there any way in looking at the meta data of a .MOV exported from Final Cut 7 that allows me to see what the project file was? I have this exported file, but I can't locate the original project file from where it was from. Was hoping there would be some sort of data that exists that shows me the directory. I've searched by filename and date created all over my drives but no luck.

    Well, FCP comes from an age where it was assumed the editor had his $#%^ together.
    EDIT: One of my mentors had the conviction that every day when you left the cutting room, you should leave it in such a way that a perfect stranger could walk in in the morning and pick up right where you left off. I really strive to live up to that ideal. I know we all get crazy busy and don't always properly archive our stuff, but it DOES save a lot of headaches down the road.
    Message was edited by: Jim Cookman

  • Opening a file from Excel

    I have an .htm file in the server. The location is /Data/Webfolders/<appset_name>/appset publications/file.htm
    How can I open this .htm file from excel? Is there any evmnu command available for the same.

    Hi,
    Thanks for the help. I think I will go with OSCLD command.
    However, if I want to use the command in custom menu, how should I define it. I used the below command in the Action column of the custom menu EV_DEFAULT tab.
    OSCLD("Quality","Reporting Planner.htm", , ,1)
    But the above statement is not working.

  • Hi i have just completed an imovie project and tried to save a hard copy on the desktop so i dragged the project file from the home page then movies folder and now the prioject seems to be lost , how can i get it back ?

    hi i have just completed an imovie project and tried to save a hard copy on the desktop so i dragged the project file from the home page then movies folder and now the prioject seems to be lost , how can i get it back ?

    It's a Finder feature, related to Quick Look. You can hit the space bar in the file list to get a preview.
    If that doesn't work, you may have an issue witha  preference file or similar. I find rebuilding the launch databse works quite well resilving tis kind of thing, as does trashing Finder preferences

  • Uploading a file from excel

    Hi All,
       can any one tell me the procedure for uploading a file from excel to ecatt.
       Regards,
       Afroz

    Hi Afroz,
    =>In SAPGUI release 6.40, one can directly attach the excel to test configuration.
    =>In SAPGUI 6.20, read the excel using function module
    'CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD' in ABAP-ENDABAP block. Find the count of lines. Using DO-ENDO loop using the count of lines as counter, assign the current set of data to transaction.
    Regards.

  • How to import a file from Excel or Access?

    I use Oracle816 on windows2000 Server..
    Let me know!!
    How can I import a file from Excel or Access?
    null

    Treat the excel file as you would any other file you load into the Repository.
    Files can be loaded into the Repository from the Repository Object Navigator, the Commandline tool or even through the Java API.

Maybe you are looking for