+ Reply to Thread
Results 1 to 11 of 11

Saving a file to onedrive shared network and access via onedrive online

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Saving a file to onedrive shared network and access via onedrive online

    Hey guys...

    First time ever working with network path...This gives me a badfilename error...any ideas...

    Please Login or Register  to view this content.
    Last edited by sintek; 03-05-2021 at 10:57 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Saving a file to onedrive shared network

    yes, you are checking bad file name cuz you are doing

    Please Login or Register  to view this content.
    and result is

    Please Login or Register  to view this content.
    so you check then, this

    Please Login or Register  to view this content.
    but you need to check this

    Please Login or Register  to view this content.
    DIR() does not like spaces in paths. =)

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Saving a file to onedrive shared network

    Result is
    "https://d.docs.live.net/1234/SawisAuto/March 2021"

    Please Login or Register  to view this content.
    is
    Please Login or Register  to view this content.

  4. #4
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Saving a file to onedrive shared network

    sorry. i just check. yes you are right. but, dir is vba function. you are checking if dir exists on a drive, not on windows machine. i think that is the issue. almost positive. if so, probably nothing you can do. what is d.docs.live.net?

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Saving a file to onedrive shared network

    I am wondering if users pc is connected to the network?...Will have to check...This could be reason it is causing error..Just assumed it was...

  6. #6
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Saving a file to onedrive shared network

    like i said, vba functions should not work to check actual URL. that makes no sense.

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Saving a file to onedrive shared network

    I am so over this....

    System works perfectly when pc is synced to one drive...And file is opened from one drive folder...

    Problem however...is it possible for the system to be opened in OneDrive Online 365 version and have all the same functionality...If opened via the Excel desktop app...

    When this is done the initial paths used in code ("C:\Users\Steven\OneDrive\") does not work as the paths have now changed to "https://d.docs.live.net/1234/SawisAuto/"
    Last edited by sintek; 03-05-2021 at 11:13 AM.

  8. #8
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Saving a file to onedrive shared network and access via onedrive online

    Maybe you just find out why I don't prefer microsoft. LOL.

  9. #9
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Saving a file to onedrive shared network and access via onedrive online

    My feeling is that whoever create OneDrive as a cloud service was not paying attention like they should regarding how it rolled into the operating system. I have had many weird things happen with one drive on networked machines that made no sense whatsoever. Automatic syncing, file saving where they shouldn't,..

    That is why I do not use Microsoft unless I have to :-(

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Saving a file to onedrive shared network and access via onedrive online

    So...Lets try this again...
    File is saved into OneDrive Folder which is synced with OneDrive in Cloud...

    When opened from the OneDrive folder Path is ...
    Please Login or Register  to view this content.
    All functions run perfectly...

    When this file is opened from the Cloud however, File is opened with "Desktop App"...365 Option...this allows macros to run...
    Path then changes to "https://d.docs.live.net/1234/SawisAuto/" which causes the errors when saving pdf's and trying to attach to Outlook...
    Last edited by sintek; 03-10-2021 at 12:23 AM.

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Saving a file to onedrive shared network and access via onedrive online

    K, I'm going to put this one to rest...This Function solves as it changes the path to the locally saved OneDrive Path...Thanks Rory...

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Now the other side of this for another thread...
    Last edited by sintek; 03-10-2021 at 12:21 AM.

+ 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. Code is not able to save the file at desktop but its saving file on the network.
    By A9kurs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2020, 07:49 PM
  2. Issue saving file if in users or network drive
    By Vaslo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-24-2018, 09:36 AM
  3. VB Code for saving file in a network rnvironment
    By ray.kanata in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-17-2015, 03:18 AM
  4. Saving File Attachment from Outlook to Network Drive
    By TRMoonPunk in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-30-2014, 02:36 PM
  5. [SOLVED] VBA to create a folder on a network drive before saving the file to it?
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-29-2011, 10:23 AM
  6. problem saving excel file on a network
    By cell in forum Excel General
    Replies: 1
    Last Post: 03-20-2006, 03:50 PM
  7. Saving Excel file to Network drive
    By kantjer in forum Excel General
    Replies: 5
    Last Post: 04-06-2005, 09:16 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