+ Reply to Thread
Results 1 to 6 of 6

Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

  1. #1
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    I have done several things where I have had an excel workbook check out a file in SharePoint and modify/add etc. data between and then attach data via a userform to a created outlook e-mail and send.

    They work great... now however I am trying to do the flip and I just can't get it to work. I added a macro on outlook tool bar and it activates a user form the userform sticks some data into an e-mail and then is supposed to check an excel file out of sharepoint and modify that file before sending the e-mail the problem is here:

    Workbooks.CanCheckOut("filepathandfilename") = True Then
    Workbooks.CheckOut ("filepathandfilename")

    The 2nd line will not seem to work.. I can stick a msg box after the first line confirming ability to check-out so I know it's not the "Can" step... how do I work around outlook not wanting to actually check out the file.

    I can get the file to open by adding some more code and commenting out the 2nd line above... but that doesn't check it out ... as a work around is there a way I can use the VBA code to toggle "on" the button that appears at the top of the screen asking the user to check out the file if desired....???

    Thanks as always to any and all ideas and help!!
    Last edited by LiLi1; 08-03-2011 at 05:26 PM. Reason: clarify wording

  2. #2
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    Anyone..??. with ideas

    Tried playing around with checking it out by calling and refering to a function ... didn't work

    Got the idea from here http://www.eggheadcafe.com/community...int-files.aspx

    Also tried this as alternative code

    Microsoft.SharePoint.SPFile.CheckOut()
    Microsoft.SharePoint.SPFile.CheckIn()

    Still no luck ... super frustrating

    as a long shot...any ideas on references to enable...would this have anything to do with it??? one of my co-workers tried enabling the "excel VBA" into the outlook options.. not sure I totally understand about this but get the general idea
    Last edited by LiLi1; 08-04-2011 at 12:46 PM.

  3. #3
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    http://www.eggheadcafe.com/software/...m-library.aspx

    seems to be somewhat along the same lines.. but I don't understand the solution ... how do you toggle the "edit" option on ???

  4. #4
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    The beginning of this thread also seems to be somewhat aligned to same issue but my skill set isn't strong enough to understand it well enough.

    http://www.eggheadcafe.com/software/...open-file.aspx

  5. #5
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    I tried getting the excel file to execute code upon open that would "push the check out edit option button" ..

    I ran the macro recorder with-in the excel file located on SharePoint and pasted what the macro recorder had:

    ExecuteExcel4Macro _
    "(""https://path/filename.xlsm"",48)"

    But alas no luck here either .. I get an error code when I put the code in excel as an at open code... it doesn't like the quote marks apparently.

    When I added the code to the outlook code nothing happened either ...

    Adventure to be continued...

  6. #6
    Forum Contributor
    Join Date
    01-14-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook

    In the end I just stuck a msg. box in the code instructing the user to click the check out button and hit okay once the check out button was pressed.

    I then added another msg box once all copying pasting is done... stating that that "data has been downloaded " now please close. Hit okay once closed....

    So the user checks out and then in...

    it's cumbersome and ends up with multiple button clicking for user .. but it works ..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1