Results 1 to 7 of 7
  1. #1
    maxis is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2013
    Posts
    30

    UrlDownloadToFile API in MS ACCESS VBA not working with Sharepoint ONLINE (on the cloud)

    Been using API URLDownloadToFile for many years to download files from a SharePoint website, but we recently went to SharePoint ONLINE (on the CLOUD – not exactly the same as the old SharePoint server method) and it stopped working KIND OF. It still returns 0 (File downloaded OK), and a file is downloaded, but only a tiny part of the file is download; always 4kb in size for the pdf file we're testing with. The pdf file is about 10mg in size. Then Adobe DC gets a "cannot open file because it's not formatted correctly".

    Note, if we open up IE and go to the SharePoint ONLINE site, then classic view, then select OPEN with FILE EXPLORER it "does something in the background" and the very same code and API URLDownloadToFile WORKS with NO CHANGES. A complete (10mg size) file is downloaded and works perfectly.

    What VBA steps do I have to use before calling the URLDownloadToFile API to duplicate what the FILE EXPLORER is doing mysteriously in the background? It's just a file (not a SharePoint LIST) that we want to download from SharePoint ONLINE site and save automatically into a specific folder on the local laptop, then run word, excel, adobe dc to automatically open the downloaded file based on its file extension .doc, xlm, .pdf, etc.

    Thanks so much in advance.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    You may find something in the Similar Threads area at the bottom of the page.
    I am not familiar with Sharepoint.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    maxis is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jul 2013
    Posts
    30
    To me this is intimidation…like a bully would do! I am banned on VBA EXPRESS because this same user is policing my posts and obviously has issues with cross posting. I don’t, and whether you believe it or not, haven’t heard it’s a problem. Especially if you post the solution at each site. Everyone wins, and forums have different audiences. Now cross post to 10 forums, well then you might have an argument. So now, because of one user I’m likely to not get a response, and I got banned on vba express for calling out two very rude people. Shame on you… that’s not what forums are about either… send a private message if you really want people to LEARN.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Quote Originally Posted by maxis View Post
    To me this is intimidation…like a bully would do! I am banned on VBA EXPRESS because this same user is policing my posts and obviously has issues with cross posting. I don’t, and whether you believe it or not, haven’t heard it’s a problem. Especially if you post the solution at each site. Everyone wins, and forums have different audiences. Now cross post to 10 forums, well then you might have an argument. So now, because of one user I’m likely to not get a response, and I got banned on vba express for calling out two very rude people. Shame on you… that’s not what forums are about either… send a private message if you really want people to LEARN.
    From the VBA forum
    40 years in IT and many forums, but I’ve never heard this.
    That was certainly not my intention. Mine was merely to make people aware the question had been asked elsewhere?
    I have asked if a ban is completely necessary at VBA Express, as even I feel that is a bit harsh, but likely the other poster to your thread, is an admin for that forum?
    You can always ask at https://www.access-programmers.co.uk/forums/whats-new/, but please mention you have already asked here.
    Also do not even think of using MrExcel unless you do the same, as they take it very seriously.

    A private message does not alert other posters?, which is what the crosspost post is all about. plus if I or anyone else was to do that, how much notice do you think people would take?
    Then you might well be correct in the assumption that I am being a bully?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    maxis is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jul 2013
    Posts
    30
    I think your intentions are good, but don’t agree with your methods. Do it on one forum maybe, although I don’t agree with it. But when you make the extra effort to find the cross post on ALL/OTHER FORUMS, then that’s a MISSION and now your ‘cause’ impacts my experience. In the end your opinion ultimately caused me to be banned from a forum I think I was part of for 10 years, a while anyway, and my NEW EXPERIENCE is from an old movie with regards to your actions and the other person who banned me; MEAN GIRLS! And by the way, repeating MrExcels policy doesn’t make it right.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    No mission, believe me.
    Access community is not that large, Members exist in other forums. My memory is not even that good these days, but if I recognise a crosspost I mention it.
    https://www.utteraccess.com/topics/list/new is another forum you can use, and they are very tolerant, but still not fond of crossposting, unless mentioned?

    However members from here, and AWF and VBA could exist there. i know some do, but there are good few experst at UA who are very well known in the Access community, and who do not seem to frequent other forums. it is UA and that is it.
    So perhaps try there as well, they are very knowledeable, but again, do tell them that you have crossposted here at least. it really is just common courtesy.

    Hopefully VBA might rescind your ban, only time will tell.? You joined there a little under 5 years ago, Nov 17, and had only made 12 posts?

    Mr Excel's notice on crossposting is often referred to, as it clearly explains why crossposting without notification is frowned upon. No need to reinvent the wheel?

    Up to you. I have given you two other forums to use? Both have very good experts in Access and Access related subjects.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. URLDownloadToFile stopped working only for ME
    By SteveApa in forum Programming
    Replies: 0
    Last Post: 08-04-2020, 11:02 AM
  2. Replies: 9
    Last Post: 02-11-2019, 05:50 PM
  3. SharePoint Online and Access Services End of Life
    By smithliam270 in forum Access
    Replies: 0
    Last Post: 10-11-2017, 03:37 PM
  4. Replies: 2
    Last Post: 04-19-2016, 04:09 PM
  5. Replies: 0
    Last Post: 03-05-2012, 01:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums