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!!
Bookmarks