Category Archives: MS Word

The End of RegEx in VBA, Not Quite So Fast!

So a short while ago Mike Wolfe mentioned that Microsoft had announced they were going to phase out and retire VBScript

and the implications of this could be far reaching impacting all sorts of things, most notably the possible loss of:

  • File System Object (FSO)
  • Regular Expressions (RegEx)
  • and more

All that has officially been stated is

Effective October 2023, VBScript is deprecated. In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system.Microsoft
VBScript will be available as a feature on demand before being retired in future Windows releases. Initially, the VBScript feature on demand will be preinstalled to allow for uninterrupted use while you prepare for the retirement of VBScript.Microsoft

Now let’s be clear here, we are all still waiting for clarifications to come from Microsoft on the subject so we can truly know 100% what will be lost when this does actually occurs, which libraries are going to disappear.  Everything up until now is simply logical assumptions based on what we know of the libraries, but no official specifics have truly been given to date. (and yes, many people have asked for clarifications, but none have been given thus far)

Continue reading

Microsoft, You’re Killing Me Here!

I’m seriously at a loss for words.

What the …
How in the name …

You just can’t make this crap up!

Once again, stubborn as I am and a sucker for punishment, I decided to try and help clean up the Feedback Portal by flagging off-topic feedback items in the hopes that it would facilitate Microsoft’s (I’m assuming the Access Dev Team’s) job to deleting the irrelevant posts.

So I did a quick test and isolated 2 off-topic items:

here they are as they appeared this morning:

Continue reading

VBA – Creating Windows Notification Without APIs

White Notification Bell in a Blue circle

Today, I wanted to explore creating Windows Notifications, those popups that appear typically in the bottom right-hand corner of Windows to let you know you received e-mail, the antivirus ran and found nothing …

You know, these things:

I have seen very convoluted code filled with various APIs to mimic this, but today, I wanted to show you a little of what we can do with VBA and PowerShell that should amaze you and goes far beyond what is possible via other techniques.

In the first section we will explore creating Notification Balloons using naive PowerShell (called from our VBA).  In the second section, we’ll kick it up a notch and deploy an open-source PowerShell module that we enable us to create some truly remarkable notifications all from simple VBA calls.

So let’s dig in!

Continue reading

VBA – RegEx – Trimming Multiple Spaces Throughout a String

Yesterday, I came across the following thread:

in which NauticalGent was asking how one could run an Excel WorkSheet function from within Access to remove multiple spaces that appeared in strings.

Continue reading

Using RegEx To Validate A Password

Purplish Round Lock Icon

I was cleaning up some of my code and organizing a few RegEx samples and realized I never created a routine to validate passwords.

Thus, I decided to do so.

Now, before going any further, it is obviously possible to create, using standard VBA parsing functions (InStr, Left, Right, Mid, …) iterating over each character for each rule you wish to enforce, a routine to perform such a validation, but where’s the fun in that! And let’s be serious, this is what RegEx was made to do!
 
Continue reading

Simulating Keyboard Keystroke Sequences

Keyboard

I recently published an article and YouTube video about Speech Recognition

If you  watch the YouTube video I demonstrate simulating keyboard keystroke sequences via the keybd_event API to enable/disable the Windows Speech Recognition application.

Continue reading

Adding Speech Recognition To Your Application

Microphone

Why type when you can talk!

And so I set off to see if we could enable some form of dictation/speech recognition with an application.  Yes, obviously for my testing I used my favorite tool, Access, but this solution can easily be implemented in any VBA application: Access, Excel, Word, …

Now, previously, I posted about making Access talk to users, read back content using the SAPI library

and so I started searching, exploring and low and behold, SAPI also offers speech recognition capabilities!!!

Continue reading

Clear The VBA/VBE Immediate Window

Lego sweeping

Here’s a useful function I’ve pulled from my archives that I thought might help a few of you out there.

How to automate, clearing the VBA/VBE Immediate windows of its content.

The code below is one of the only times I will use SendKeys. I also have another version which only uses APIs and avoids SendKeys, but obviously is more involved from a coding perspective. Perhaps a post for another day.

Continue reading

Shape The Future Of MS365

My parting gift to you is to share a link that was brought to my attention by Maria Barnes.

Microsoft is now holding ‘Research Panels’ to gather information that will help shape the direction that MS365 will take. This is where. even MVPs are being directed to provide feedback now!

So if you’re interested in joining in and having your say, then check out:

Continue reading

Find the associated EXE file – Updated

I wanted to provided an update to code provided on The Access Web’s website to find the associate executable to a file.  The original article/code can be found at:

 

My goal was to make it 64-bit compliant, but once I started doing so and investigating, I also decided to update the declarations, constants, messages to match those in Microsoft documentation for the API.  The resulting then became:

Continue reading