MS Excel VBA Reading Outlook Calendar Items Very Slowly - excel

I'm in the process of writing code to pull my own Outlook calendar, as well as some shared calendars into an MS Excel spreadsheet. However, I'm finding that my script is running very slowly. I've found that it takes about 1-2 minutes to load a months worth of events from my own calendar and about 10-20 minutes to load events from the same time period from a shared calendar.
I've noticed that my script can load my personal calendar both when I'm on and offline. However, I will get a run-time error at the when I call ".GetSharedDefaultFolder" if I am not connected to the internet. In addition, if I disconnect my internet while looping through items in a shared calendar, I will also get a run-time error. My best guess at the moment is that the majority of my speed issues are due to the fact that Outlook is checking the exchange server for each item, one at a time (I'm pretty sure this is happening).
Does anybody have a good idea of how to solve this problem? I'd like to speed up my code so it doesn't take ~45 minutes to run my script. I have a hard time believing that Outlook does not store the most recent version of a shared calendar on my laptop. I also don't see why I shouldn't be able to call some function to download the entire calendar and then loop through the items without needing to separately request each item from the server.
Thanks!

I actually managed to fix the problem by enabling the "Download shared folders" property in MS Outlook. This reduced program execution time from 45 minutes down to 7 minutes.
Directions on how to enable the "Download shared folders" property:
http://www.msoutlook.info/question/414
Note: To find the Account Settings button in Outlook 2013, you have to navigate to the "File" menu.

Related

Excel-Online & Power Automate Script (flow) Manually working, Cloud flows not working

Recently I have started working with Excel Online within the organization I´m working. Currently as a team we are using the online feature of Excel and work together simultaneously in the same sheet. In order to avoid many, daily, actions, I created so-called Flows to either group or ungroup certain data and have less (= group data) or more (= ungroup data). When I discovered the option to automate certain flows (via Power-Automate) I tried making an automated Flow that basically executes on a daily bases one of the Flows (group data) in order to start the day with an organized and neat workfile.
I created the following Flow;
Recurrence:
Interval: 1
Frequency: Day
Run script:
Location: OneDrive for Business
Document Library: OneDrive
File: File location
Script: Script name
Connection in use: Excel Online (Business)
Owner: Myself (both of file and flow)
What I have tried is the following:
When I am just executing the flow manually within Excel Online, it works good. Without
problems. It takes like 20 seconds and never had any issues.
I have played with the settings of the flow to see if it has any impact
(interval, frequency, other location, etc), without succes. After
like 20 minutes of runtime it returns a "Failed error" and the script
does not get executed (Error = BadGateway).
Additionally, I read somewhere online someone who had the same problem and it got solved by
indicating a Timeout limit (tried PT30S,
makes no difference other than the Failed error pops-up sooner).
I checked the subscriptions linked to my account and, amoung others, supposedly I have the
following; "Power Apps for Office 365" & "Power Automate for Office 365" licenses. Reviewing the
"Power Platform Licensing Guide - June 2022 (2)" I am assuming I do have the correct licenses
in order to be able to execute these kind of flows (see below).
However, I cannot seem to make it work. Is there anyone out there experienced with the Power Automate (online) functions within the Office 365 online environment who can identify what problem I am dealing with here and how to solve it?

Sharepoint Excel attachments suddenly not opening?

I've been working on a process that copies attachments to a couple places. Here's the basic outline:
User adds attachments to Power App
Power App adds those attachments to SharePoint list item
Power App/Automate adds those attachments to Freshdesk ticket
Power Automate copies attachments from SP to send confirmation email to user.
When FreshDesk ticket is closed, Power Automate reads attachments from Freshdesk notes and adds them to 1) an email to the original user and 2) the original SP list item.
Everything seemed to be working fine, but I am suddenly having issues specifically with Excel attachments. I can open them in their original OneDrive location, the emails they're attached to (although the Excel previewer doesn't always want to open), and in the FreshDesk ticket. I cannot open them in SharePoint. I just get an error that "This workbook cannot be opened."
These exact files were working fine before. I've cleared my cache, restarted by computer, and tried a different browser. Nothing will let me open them from my SP list. Help!
Edit: Solved, thanks to the folks on r/sharepoint! It's a Microsoft bug. You can view it in the M365 admin Center under Health. Description below.
SP411415 :
Title: Users can't open recently created Excel files from within SharePoint Online lists
User Impact: Users are encountering an error when attempting to open Excel workbooks from SharePoint Online lists.
More info: Affected users will see the following error:
"The workbook cannot be opened"
Current status: The fix has been submitted and we anticipate that deployment of the fix will start within the next one to three days. We're monitoring its progress to ensure the fix gets deployed and saturates throughout the affected environment.
Scope of impact: Any user hosted on the affected infrastructure will be impacted.
Root cause: A recent service update contains a code error within the previewing function which is causing an exception, resulting in impact.
Next update by: Thursday, August 11, 2022, 4:00 AM (9:00 AM UTC)

SSRS time out issue

I have created a SSRS report in SharePoint and its uploaded in to the SharePoint library. While running, its working fine. It taking less than 10 seconds to load the report. But If I kept the report in idle mode for the next 5 minutes, then I tried to enter the text in search box in report tool and then clicked find. But instead of displaying the result, it loads the report again. And If I pass the search criteria, it will works. So My assumption is that, it would be the problem of time out. So can you guys advise me where can I update the time out value to avoid this issue?
If this is SSRS SharePoint integrated mode I guess something should be available in Central Admin to which usually developers might not be having acces atleast in prod environment. Check with the administrators who manage your farm.

Outlook 2013 detected a slow addin

I developed an Addin which consists of Login and the data entry and retrieval functionality. The data entry and retrieval are accessed through REST URL's. The Outlook Startup doesnt has any code, except it checks the outlook version. I implement a plain form which show the user "loading message" initially and the rest of the logic will be handled by a thread. So i hope everything is followed according to the performance, but still i am receiving an addon error as "Outlook Detected an Addin Problem" The Add-in caused outlook to start slowly. I am able to overcome this problem and more and more i am able to get the time statistics for application start or shutdown events. couldany help me how do i resolve this?
Are you trying your AddIn in a debug mode or through an installer ?
First of all, make sure that it has been disabled because it is slow and not because it has errors.
If it has errors, it will cause Outlook to work slowly or even crash.
If it just working slowly, you can try to optimize your AddIn, go through your code again and see what you can do again in a less performance consuming way.
One other thing you can do is, when you will create a setup project for your AddIn to run an installer (instead of debug), you can set your Load Behavior to 16 in the registry.
This will cause the AddIn to load at Outlook startup on the first time after installation and to load on demand the other times. (Load on demand means when the user clicks on the AddIn icon).
This way, your AddIn won't slow Outlook down, except for the first time.

SharePoint Pivot Upload

Every morning at 2:00am (or when ever all the pivots finish building) I run a vb.net program to upload all the pivots to a specified shared documents folder inside of SharePoint. Sunday through Friday the script runs perfectly but on Saturday morning it fails to connect via webdav.
"The specified network name is no longer available"
This is strange because we even put a 30 second delay in there if it receives such an error to give the site time to wake up if that is the case. There is nothing strange showing up in the event viewer on the Pivot Server or on the SharePoint server.
I have a few other programs/scripts running during the day that work flawlessly every single day.
PowerShell script to upload all users from Active Directory into 410 various groups
PowerShell script to set the permissions of the Pivot folders so only the right people see their pivots (This runs at 3:00am and works fine)
And a few others
I can't seem to track down this one.
there are some powershell "sharepoint warmup" scripts to be found on the interwebs, that basically loop through all site collections and makes a request, firing up all web apps, maybe you could give that a try, have it run say every day at 6 in the morning?

Resources