Results 1 to 3 of 3
  1. #1
    Lauro2 is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2022
    Posts
    2

    Problem with Access-Word interop in OneDrive

    Hi,
    I have a problem linking a Word file as an OLE object inside an Access Table/Form if file is saved inside OneDrive


    Here you can find a small database to simulate the problem.
    You should try to put this Access file inside and outside a OneDrive folder to fully understand the problem.

    Inside the database there is a table tblFiles with a field for OLE Objects (Word documents); and the related form frmFiles with a Bound Object Frame control for those OLE Objects.

    When you click the addRecord in the footer of the frmFiles a new Word file is created; something is written in its content and the only 3 fields of a new record are filled with the Name, FullName and OLE Object of the newly created file.

    To link the file I used the following code, where BOFC is the Bound Object Frame control and the string sFullFileName is obtained or joining the path of the Access file with the name of the Word file or taking the FullName property of the Word file.

    with BOFC
    .Class = "Word.Document"
    .OLETypeAllowed = acOLELinked
    .SourceDoc = sFullFileName
    .Action = acOLECreateLink
    end with

    If the files are saved outside OneDrive Folders everything works as supposed.
    If the file are saved INSIDE a OneDrive Folder there could be one of the following two problems:
    • If sFullFileName is the local path "E:\OneDrive\Documenti.... then Error 2737 (Impossible to found the file containing the OLE object linked that you try ti update through the comand link OLE/DDE) [or something similar, mine is in Italian]
    • If sFullFileName is the cloud path "h ttps://d.docs.live.net/2ae.../Documenti.... then Error 2101 (setting non valid for this property) [or similar]


    It seems very strange to me that there are no solutions.

    I don't want to obblige the user
    to save the files outside OneDrive folder
    neither to abandon the sync of Office files with One Drive

    The SourceDoc property of a Bound Object Frame control has always to be a local path?
    There are other ways to link and show a Word file saved on the cloud in an Access form?



    Thank you very much for every suggestion.

    Lauro

    P.S.: I tried with Google Dtrive and DropBox and everything is ok.

  2. #2
    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

  3. #3
    Lauro2 is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2022
    Posts
    2
    I apologize for the crossposting.
    Next time I'll avoid it or at least I'll mention if and where I posted a similar question.
    Lauro

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

Similar Threads

  1. Sharing Access file using OneDrive?
    By vha7 in forum Access
    Replies: 3
    Last Post: 11-05-2018, 12:52 PM
  2. Access and OneDrive
    By JAL3 in forum Access
    Replies: 4
    Last Post: 06-04-2018, 05:29 AM
  3. Using Access in Microsoft's OneDrive
    By rjgriffin46 in forum Access
    Replies: 4
    Last Post: 04-09-2018, 06:18 PM
  4. Replies: 5
    Last Post: 06-03-2013, 12:58 PM
  5. problem with Word in Access
    By Milo4ka in forum Access
    Replies: 0
    Last Post: 03-25-2011, 03:50 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