Moving OneNote in sharepoint using files explorer breaks Get pages - sharepoint

We moved OneNote hosted in SharePoint from one folder to other using file explorer (View in file explorer option). After the OneNote is moved it started looking like a folder instead of OneNote file and we don’t get the notebook which we moved in Get Note books API call. Accessing the one note from client works normally. It is just that OneNote which is moved is not listed in Get Notebooks API call. How to fix it?

I work on OS X so I hope this answer is relevant to your situation.
Uploading a notebook to SharePoint results in it losing "special permissions" and becoming just a regular folder (I think this is what is happening to you too).
The workaround I use is to create a new OneNote notebook with the same name and then copy the files from the old notebook to the new one and it will work again in the API.
The actual pageIDs will change as the new notebook has a different ID and you will have to reload the notebook in the OneNote app.
It would be great if there was a function in the API to download and upload Notebooks to Sharepoint, I put a suggestion into the OneNote API's user voice.

Related

Reading data from shared teams text file using VBA in Excel

I have created a tool using VBA that performs several pulls from BigQuery and does a variety of transformations and summarization inside of Excel. The tool is an evolving tool and to make sure that the users are using the most current version of the tool, I would like to have a version file saved on the shared Teams page that the tool would check and if needed, download the newest version onto the tool to the user's folder. I have scrubbed the web for several solutions to this ask but not one that actually works. Below are the links to the solutions I have attempted. The issue is that the connectors for opening text files seem to not work with a URL from Teams. I need to know how to make this work. Any help would be greatly appreciated.
https://www.excel-easy.com/vba/examples/read-data-from-text-file.html
This solution doesn't seem to work with a URL as I get a Bad Filename error.
https://chandoo.org/forum/threads/download-file-from-sharepoint-and-save-it-in-system-folder.41779/
Problem with this one is that the download for some reason shows completed but actually never moves local.
Connecting to Excel file stored on SharePoint via ADODB
https://www.connectionstrings.com/textfile/
I attempted to use this solution using the text file connection string but was not successful here either.
https://www.exceltip.com/import-and-export-in-vba/import-data-from-a-text-file-ado-using-vba-in-microsoft-excel.html
Again, another bad name error.
Any help or advice on how to connect to a simple text file shared in a Teams folder would be greatly appreciated.

bulk download files from microsoft sharepoint

bulk download from share point not downloading exact files and error.txt files are generated.
is there any application to bulk download sharepoint files
https://i.stack.imgur.com/cnOyy.png
https://i.stack.imgur.com/X5wf2.png
You can use the Open with Explorer function to open the document library in Windows Explorer, where you can select all the files you want and simply copy them to your destination. Note that this function only works in Internet Explorer, not in Edge or any other browser. There are ways to make it kind of work in modern browsers, but that requires custom code. You can, however, save the location of the document library to the Quick access list to make it easier to find.
Another option seems to be the SharePoint Bulk File Download web part, but I believe this is a paid tool that must be purchased after the trial.
I use Open with Explorer all the time, but I have never tried the mentioned web part.

Unable to connect to Excel file in OneDrive

I've been searching and searching but with no luck. Is there a way to use Excel VBA to import master file data from another excel workbook saved in OneDrive?
Thanks in advance.
A.) If you have an excel workbook that is stored locally on your PC but inside your OneDrive sync-ed folder.Then you can use following VBA code to approach one drive file. Once file is available there are many routines already on SO to import data.
Sub Test()
Dim fn As String
fn = "Your File " 'change file name
fn = Environ("onedrive") & "\" & fn
'check to see if it exists
If Len(fn) > 0 Then
Debug.Print fn
End If
'... do something.......
End Sub
B.) FETCH FILES If you have the OneDrive desktop app for Windows installed on a PC, you can use the Fetch files feature to access all your files on that PC from another computer by going to the OneDrive website. You can even access network locations if they're included in the PC's libraries or mapped as drives. When you browse a PC's files remotely, you can download copies of them to work on. You can also stream video and view photos in a slide show. To access files on your PC remotely, make sure the PC you want to access is turned on and connected to the Internet. OneDrive also needs to be running on that PC, and the Fetch files setting must be selected. For further Details please refer Fetch files on your PC
C.) FIle on ShareOint - VBA aopproach If your file is on SharePoint. OneDrive doesn't sync the shared files to the local and sync. In such case VBA code is available on SO VBA download a File from OneDrive by #Sid29
D.)REST APIs - Microsoft Graph Another situation is elaborated in the following paragraph which uses API.
The OneDrive REST API is a portion of the Microsoft Graph API which
allows your app to connect to content stored in OneDrive and
SharePoint. The REST API is shared between OneDrive, OneDrive for
Business, SharePoint document libraries, and Office Groups, to allow
your app the flexibility to read and store content in any of these
locations with the same code.
These REST APIs are a part of the Microsoft Graph, a common API for Microsoft services.
For existing solutions using OneDrive API outside of Microsoft Graph, or solutions targeting SharePoint Server 2016, see direct endpoint differences for more context on reading this documentation. OneDrive and SharePoint in Microsoft Graph
E.) It may be difficult to get url of specific online file of onedrive. Microsoft Community has covered a situation where they have suggested VBA code for downloading of a file without URL.It is report xlsx from a web application.
Because the URL isn't the path to the file, it's a 'file request link' it processes single sign on verification, then the download popup is displayed.
Though it depends on the web site , code mentioned in article executed successfully using IE browser. Code mentioned in this article can be experimented with. There is no other method to load online onedrive file through VBA in my knowledge.

Can I create a browser extension that prevents download of specific file types and forwards user to a link?

I want to create an extension that prevents Office documents download and instead opens them in Office Online. Do browsers (preferably Chrome and Edge) have such API and what code do I need to write to implement my idea?
If we talk about Edge then we cannot stop the file from getting download.
If you have the direct link of file then you can directly open it using Office Online.
You can try to store your Office files on OneDrive. Then you can open it via Office Online.
There is an extension available which supports both Chrome and Edge for the same purpose.
If you store the file in OneDrive then it can open the documents in Office online.
But, It cannot stop the Office files from getting download.
Quick access to your Office files in the browser
I did not get any code example to develop the extension that can prevent the user from downloading the Office file and open it in Office Online.
For chrome (although Edge is supposed to support chrome APIs but I've not tested) please check a potential solution at https://browserextensionresources.blogspot.com/2018/09/intercepting-file-download-in-chrome.html

Word 2016 Add-in blocked from accessing data for some Windows users

I've got a mysterious edge case with some Word 2016 users on Windows using my Word add-in.
I realize much more info might be required...but I also feel this is an issue that might have some proven ways to diagnose - or someone may know of a root cause.
My simple Word add-in pulls data from a MySQL db on my web server (via php) and stores it in localstorage. Works great in Word 2016 on multiple computers. A handful of users can't, essentially, download data and my solution throws errors for them.
I've even had 2 users on the same machine - one who can use my add-in, one who cannot (so each logging into different Windows accounts at the same institution. The user who was able to happily use my app is in IT and maybe had different settings).
My nose tells me there is an Internet Explorer security setting getting in the way...we've verified that localstorage is allowed.
When a user with the problem opens Internet Explorer directly, they're able to download data and use the app (part of it works outside of Word). As I understand it, Word 2016 Add-ins use Internet Explorer 11 to render html/js/css - and a setting changed in a user's IE11 settings area will cascade to Word 2016 add-ins.
Some of the weird details I've picked up:
Opening a new browser window from inside Word (clicking on a link in my add-in that opens a full web browser) prompts a "A website wants to open web content using this program on your computer" and points to Internet Explorer's Protected Mode. I've experimented with turning this on myself and can't recreate the issue.
The user isn't signed into O365. That doesn't seem to make a difference either.
Debugging via F12Chooser shows an [object error] with an error code of "-2147024891" and a "stack" message of "Error: Access is denied..." at the point where data would be pulled...I can't get much more out of the console.
The add-in is able to hit Firebase (I'm using Google's Firebase for authentication) and I get a response from their server...but not my ajax call to my php file.
Any thought or direction appreciated.

Resources