Save to OneDrive shared folder

adambc

Active Member
Joined
Jan 13, 2020
Messages
376
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
This is linked to a previous post of mine Select Slicer Selections in turn

My print to a PDF file saves the PDF files in a named folder which I get to by using its pathname ie C:\User\OneDrive\Documents/etc/etc ...

I now want to save the PDF files to a OneDrive folder someone has shared with me, but using the URL as the pathname doesn’t work - does anyone here know how I can either still use the URL, or how I can obtain a “real” pathname that i can use?

Thanks ...
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
OK, no takers, so let's see if further explanation helps?

I have a Excel VBA Macro that loops through a Slicer, each time creating a print to PDF file (of the filtered Worksheet) ...

On my local machine, I construct the path/file names as follows ...

VBA Code:
Set wsA = ActiveSheet

strTime = Format(Now(), "yyyymmdd\_hhmmss")
strPath = "C:\Users\User\OneDrive\Documents\Personal\Adam\Work\PDF_Files" '<<< REPLACE WITH PATHNAME FOR A ONEDRIVE SHARED FOLDER
strPath = strPath & "\"
strName = Replace(wsA.Name, " ", "")
strName = Replace(strName, ".", "_")
strFile = strName & "_" & Filename & "_" & strTime & ".pdf" '"Filename" is a variable set earlier in the code
strPathFile = strPath & strFile

... but I need to replace the local pathname with the pathname for a OneDrive Shared folder ie NOT the local sync folder ...

I have the URL for said Shared folder, but that doesn't work and no matter what I try (after searching online for hours!) nothing seems to work - HELP!!!

Thanks ...
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top