Removing Image Exif Properties Using WIA in VBA

So I was wrong in my last article, I wasn’t quite done with WIA yet, I had forgotten about deleting properties!

If you missed my previous post regarding WIA and working with image Exif metadata, here are a few links to get you up to speed:

Today, I will provide 2 procedures:

  • Delete a single Exif metadata property
  • Delete all the Exif metadata properties

This one took me a little longer to figure out as I could not find any examples or documentation that actually explained how to make it work. So this was a lot of trial and error. Especially for the WIA_RemoveAllExifPropeties, figuring out that you couldn’t delete the DocumentName property or the whole thing didn’t work.

Enough blah, blah, here’s the code.

Continue reading

Bypassing Microsoft’s New Blocking Of Macros & VBA Code

By now, you have probably heard of Microsoft’s new plan is:

to help improve security in Office, we’re changing the default behavior of Office applications to block macros in files from the internet.Microsoft

and you can learn all about when this is coming to a PC near you, and all the other succulent details, by reading:

 

Warning - The site ahead may contain harmful programs
I must apologize to any of you using that received a “The site ahead may contain harmful programs” warning originating from Google. I already appealed this block and won (they acknowledge it was done in error), but they have yet to rectify this block/warning/message. Sadly, Google has all the power and I have no control over their actions, even when directly impacting my private site.

In the sections below I will examine:

Workarounds

As for me, I am looking into what I can do to minimize the frustration of dealing with this new hurdle of adding an extra 3, 5, 10+ clicks for each individual file I want to be able to work from e-mails, websites, forums I support, …
 

Continue reading

Microsoft Office is About to Block ALL Macros & VBA Code

Figure holding a stop sign

If you haven’t already heard, beginning with Microsoft Office version 2203 (for the Current Channel), set to release in early April 2022, Office will disable all VBA code in files from the Internet.  Here’s the breakdown by Office Update Channel

Update channel Version Date
Current Channel (Preview) Version 2203 April 2022
Current Channel To be determined June 2022
Monthly Enterprise Channel To be determined July 2022
Semi-Annual Enterprise Channel (Preview) To be determined September 2022
Semi-Annual Enterprise Channel To be determined January 2023

This applies to all files! Access, Excel, Word, PowerPoint, … that you download via your web browser, receive by e-mail. It doesn’t matter the source, the method used to download them, they will have their macros/VBA code blocked. Not disabled, but outright blocked.  There will be no button to unblock them!  Now, you will need to take a series of extra manual steps to unblock these files.

Continue reading

Setting an Image Exif Property Using WIA in VBA

So I wanted to wrap up my exploration of WIA and image Exif metadata by showing you how you can use WIA to not only read values, but also set them!

If you missed my previous post regarding WIA and Exif metadata, here are a few links:

 
Continue reading

Getting a Specific Image Property Using WIA in VBA

In a continuation of exploring working with image Exif metadata via VBA, specifically working this time with WIA, I thought I’d demonstrate how you can retrieve a single property value.

Reading A Specific Exif Property with WIA

Obviously, there are a couple of ways we could do this:

  • Get the complete list of properties and their values and pull out the one we’re after
  • Check if the property exists, and if it does pull just that one

Today, I’ve chosen to concentrate on the latter as it is more efficient IMHO.

Continue reading

Open a Word Document in Read-Only Mode

Ever wanted/needed to open a Word Document, but in read-only mode? Well that’s what Plugging_Away as help with in the Answers Forum

 

A Permanent Solution

Now, Tom van Stiphout suggested an interesting solution, that is to use the SetAttr statement to change the file attribute itself, making the document read-only to all.  This is a great way to protect a document.

If you want the document to only be read-only via your application, but remain editable otherwise, this will not work as you have no means to set it back since you have no event to do so when the user closes the document.

A Onetime Solution

If the intent is to make a document read-only when launched from your application then Word, Excel, … automation is the solution.  Once you review the documentation you will actually see that this is directly an option in the Open methods, it’s just a case of creating a Word instance and then opening the document with a read-only argument set to True.

Continue reading

Enumerating Registry SubKeys Using WMI in VBA

I was trying to help a user out in a forum get a listing of all the SubKeys of a specific registry Key and thought I’d share my solution here.

Per the usual, there are a number of different ways to read the registry, but I found that using WMI is very simple.

To simplify things, I added the use of a ‘RegistryClass’ Enum so you don’t need to remember the various registry class constants.

Enough talk, here’s the code!

Continue reading

Does Microsoft Access Remain A Good Choice As A Development Platform?

Elephant covering its' eyes

I know I’ve touched upon this subject in the past, but it’s been another rough couple of weeks for Access and I wanted to see, once again, were people stand on the subject.

So, I put it to you:

Is Microsoft Access truly a good choice as a development platform today (in 2021-2022)?

Historically, I wouldn’t even ask such a question, as the answer was an emphatic, YES!, but it that still true today?!

An Unstable/Unreliable Product As Of Late

We can all try to ignore the elephant in the room, but it’s simply not going away anytime soon!

Since Microsoft switched over to their ‘new’ model of continual development & release, and are now using their end-users as software testers and being reactive rather than proactive in their development lifecycle, does Microsoft Access remain a good choice to use in a professional manner?

There’s simply no denying that in the past several years, Access has suffered from a tremendous number of bugs.  Initially, I thought this was a bump in the road with the switch over to MS365 CTR (then called Office365), a temporary growing pain Microsoft had to work through, but after more than 5 years now, these problems seems to be here to stay.

We have some bugs going on almost 4 years now with no actual fix from Microsoft yet!  It feels like a new bug emerges with every new update that Microsoft releases and it doesn’t even have to be an Access update causing issue with our databases.

Continue reading

Enumerating Registry Key Values Using WMI in VBA

I was trying to help a user out in a forum get a listing of Values from a specific registry Key and thought I’d share my solution here.

Per the usual, there are a number of different ways to read the registry, but I found that using WMI is very simple.

To simplify things, I added the use of a ‘RegistryClass’ Enum so you don’t need to remember the various registry class constants.

Enough talk, here’s the code!

Continue reading