MS Office warning

John Sh

Active member
Local time
Tomorrow, 05:50
Joined
Feb 8, 2021
Messages
612
I am using followhyperlink to open an 'NEF" image and get this message.
If I select "cancel", I immediately get an error message indicating a null value.
Turning warnings off has no effect and there seems to be no way to trap the null error except "on error resume next".
Is there a way to avoid this message.
I do not have this problem when opening a "JPG" file.

Screenshot_6.jpg
 
using this method will not show any warning:
Code:
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"
CreateObject("Shell.Application").NameSpace(0).ParseName(sPath).InvokeVerb "Open"
 
I had to look up NEF files. Interestingly, they are akin to TIFF files, which can also be problematic in some situations.
 
using this method will not show any warning:
Code:
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"
CreateObject("Shell.Application").NameSpace(0).ParseName(sPath).InvokeVerb "Open"
Works a treat.
Many thanks.
 
I had to look up NEF files. Interestingly, they are akin to TIFF files, which can also be problematic in some situations.
NEF is the Nikon raw file system, remotely similar to tiff but generally smaller file size.
It is unfortunate that each camera manufacturer has their own variation of raw data capture "and ne'er the twain shall meet"
I never could work out how tiff can take a 8mb uncompressed jpg image file and turn it into 16mb with no apparent quality gain.
 
Works a treat.
Many thanks.
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"
With CreateObject("Shell.Application").NameSpace(0).ParseName(sPath)
If Not .IsNull Then .InvokeVerb "Open"
End With
 
I am by no means actually advocating a particular program, but it is possible to find a Windows .NEF utility that claims to properly open the file and that could be used to convert it to more traditional formats. To avoid the appearance of actually advertising something, I will merely state that a simple search for "What is file type .NEF?" led me to that link. Since I've never worked with Nikon camera file format, I make no claims as to its safety and would advocate that if you WANTED to try it, do so with your anti-virus package in good working order as a precaution.
 
I am by no means actually advocating a particular program, but it is possible to find a Windows .NEF utility that claims to properly open the file and that could be used to convert it to more traditional formats. To avoid the appearance of actually advertising something, I will merely state that a simple search for "What is file type .NEF?" led me to that link. Since I've never worked with Nikon camera file format, I make no claims as to its safety and would advocate that if you WANTED to try it, do so with your anti-virus package in good working order as a precaution.
Thanks Doc_man.
I use a combination of Lightroom and Affinity Photo to process my images and only shoot in raw mode, so am well versed in the available software. The access software is required to open a 70mb raw image and a 13mb jpg as both images are stored.
FYI. My initial testing seems to indicate that the images open more quickly using the shell so it's a double whammy.
John
 
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"
With CreateObject("Shell.Application").NameSpace(0).ParseName(sPath)
If Not .IsNull Then .InvokeVerb "Open"
End With
Nice touch Jason Lee.
Thanks
 
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"
With CreateObject("Shell.Application").NameSpace(0).ParseName(sPath)
If Not .IsNull Then .InvokeVerb "Open"
End With
Hi Jason Lee.
I tried using this sub but it errors on the "isnull". "Object can't use this method"
 
Hi Jason Lee.
I tried using this sub but it errors on the "isnull". "Object can't use this method"

Sorry NameSpace being used incorrectly: -

Try the following

Code:
Dim sPath As String
sPath = "E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1\DMHN010962A.nef"

Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application")

Dim Folder As Object
Set Folder = ShellApp.Namespace("E:\Images\ALL RAW Images\Herbanium_Collection\Group_E\Ericaseae-eric-1")

If Not Folder Is Nothing Then
    Dim File As Object
    Set File = Folder.ParseName("DMHN010962A.nef")
    If Not File Is Nothing Then
        File.InvokeVerb "Open"
    Else
        MsgBox "File not found."
    End If
Else
    MsgBox "Folder not found."
End If
 

Users who are viewing this thread

Back
Top Bottom