Is Visual Basic still relevant? What alternatives are there for MS Office automation?

I recently found myself trying to write an Excel macro. Essentially the idea was to take a schedule in the form of a spreadsheet and create appointments in Outlook. This worked well in ‘old Outlook’, but I kept getting varied remote execution errors in ‘new Outlook’ - which appears to just be a UI to Outlook for the web.

The fix was odd but simple. By default, the macro was part of ‘VBAProject.’ Apparently Outlook for the Web will only run one VBA Project, and it must be named ‘VBAProject1.’ Whatever, problem solved.

But that raises a thornier issue. Since MS seems to be killing VBA by inches, what alternatives are there?

Side question…this seems like a security risk on a web server. What measures is Microsoft likely to take to protect those assets? And will they be remotely effective LOL?

1 Like

you are correct sir

We have good luck interfacing with Thunderbird

2 Likes

Based on your example with taking data from a spreadsheet and using it for Outlook tasks, check out Power Automate. It interfaces with Outlook and Excel really well. It’s not a replacement for VBA if you’re a super user to do all sorts of random stuff.

1 Like

Caveats: I am not affiliated with MS and I know only a few people working for them. From what I understand from those few people, the paradigme at MS seems to divide it’s customers into four categories.

  1. Programmers/Developers
    People who use Azure, Vscode etc. These people will be forced to use Office365 and Outlook through their organization and will interact as little as possible with these products as possible. Regarding Office365 etc, no need to cater to them.

  2. Heavy user but non-programmers
    These people will use Power Automate, Power BI or other “no-code” products. Say “Visual Basic” to them and they will think it has something to do with simplified design philosophy.

  3. The archetypical manager
    People who use products like Office365 a lot and will use a lot of the baked in tools, but will never try to do anything outside of it or across products. I.e. they will produce the appointments in Outlook themselves, from said spreadsheet - or get an intern to do it. These people are happy, that everything is online and will tell you, what their divorce learned them about B2B sales.

  4. Users
    Will use USB key found in the parkinglot, send “Reply all” mails and think Outlook is great, since it is BOTH “the interwebs mail” and the calendar.

So there is simply no need to keep VBA alive, as it does not fit into anything in these four categories. They will let it slowly die away.
For those developers, who would like to automate tasks in the Office suite are likely scuttled into using Python and the various libs like openpyxl, to automate tasks.

1 Like

@semnon Thanks for the Power Automate tip. I’ll look into it.

@Cally That’s disappointing to say the least. I’m not sure I fit neatly into any of MS’ categories. My responsibilities include a mixture of troubleshooting, sysadmin work and development, though not what I’d consider advanced coding. Occasionally I’ll need to crank out some code/scripts in Python, PowerShell or VBA. I’m also extremely constrained as to what tools I can use, as any such utilities need to go through a vetting process by corporate IT. Since Power Automate is (I think) an MS native toolkit, it may well be available.

EDIT: It looks like PowerAutomate is cloud/Internet based. This limits its usefulness for me, as some of the systems I deal with are ‘air gapped’ - no Internet or cloud access allowed. For the task at hand however it may be appropriate.

As to the task at hand, I have the core functionality working but am experiencing a lot of difficulties with permissions. It’s not just a matter of enabling macros; apparently the location (as in hard drive, network folder, etc.) is restricted as well. Great…