+ Reply to Thread
Results 1 to 2 of 2

OneDrive/Sharepoint and VBA

Hybrid View

TheBigFrench OneDrive/Sharepoint and VBA 05-31-2022, 10:46 AM
PrizeGotti Re: OneDrive/Sharepoint and... 05-31-2022, 11:19 AM
  1. #1
    Registered User
    Join Date
    05-31-2022
    Location
    Paris
    MS-Off Ver
    365
    Posts
    1

    OneDrive/Sharepoint and VBA

    Hi,
    When OneDrive is active Thisworkbook.path or ActiveWorkbook.path cannot be used to manage files, as it shows a Sharepoint URL
    I found some solution to parse the URL to find the local location of the file, but it will work on very few cases. For exemple if I move the OneDrive folder to an other drive (exemple D, I have to change the code, or if I have business and personnel OneDrive, or if I am syncing multiple tenant, or if users have a different configuration.

    I know I can strop OneDrive, but is not really convenient.

    Did some one find a solution to be able to retreive the real local file path, or is it a dead end ?

    Thanks a lot for your help.

    Regards,

    TBF

  2. #2
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    293

    Re: OneDrive/Sharepoint and VBA

    Just replace the sharepoint url with the physical location of your OneDrive folder.

    For example;

    https://mycomapny-my.sharepoint.com/personal/username/Documents/filename.xlsm?web=1
    Change to
    C:\Users\username\OneDrive\Documents\filename.xlsm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Get Sheet name, when file is stored on SharePoint/OneDrive
    By mstgier in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2022, 05:30 AM
  2. Check if a file exists in onedrive/sharepoint
    By S@S in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2022, 08:15 AM
  3. Replies: 0
    Last Post: 12-21-2021, 07:25 AM
  4. [SOLVED] VBA: Show pop-up when Excel file is opened in browser (e.g. SharePoint / OneDrive)
    By kingofcamden in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2021, 08:43 AM
  5. VBA Code for File Location on OneDrive/SharePoint
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2021, 12:50 PM
  6. Share an excel file on onedrive/sharepoint with vba
    By ARowbot in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-05-2020, 08:29 PM
  7. [SOLVED] Opening an Excel worksheet from OneDrive on a Network (SharePoint)
    By Frankie_The_Flyer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2019, 03:12 AM

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