Associate a help file with a library in the VBA object browser - ms-access

I have a reference to the Microsoft Scripting Runtime (scrrun.dll) in one of my Access projects. If I open the object browser in VBA (by pressing F2) and choose 'Scripting' from the library dropdown it shows me all of the properties, functions, etc. for the Scripting library. If I choose one of these functions and then click on the help button (with the yellow question mark) it opens a help window with the title of 'Microsoft Visual Basic Help.'
It acts like it is unable to find the help file for this library. I can manually find the help file on my computer at the following location: "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\1033\VBLR6.CHM". (Note: I have 64-bit Win 7, thus the '(x86)' in the Program Files folder name.)
I tried copying the help file to the following locations with no luck:
"C:\Windows\Help\VBLR6.CHM"
"C:\Windows\SysWOW64\VBLR6.CHM" (I believe SysWOW64 folder is the Win7 64-bit equivalent of C:\Windows\System32)
I have had this same problem with other referenced libraries as well, so I'm looking for some kind of generic solution. I'm hoping there is some way to specify a location for the help file of a particular reference, or something else along those lines.

Copy VBLR6.CHM to "C:\Program Files (x86)\Microsoft Office\Office10\1033\VBENLR98.CHM"
That's the short answer for this specific case...here's how to get there which may be useful for getting other help files associated:
Download Process Monitor (currently hosted here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx or do a Google search for Process Monitor)
Run Process Monitor with the following filter: 'Process Name' 'is' MSOHelp.exe 'include'
Open object browser in VBA
Choose the library (Scripting in this case)
Choose any function, property, or event in the library and click on the yellow question mark (this should open an empty window with the title Microsoft Visual Basic Help)
Go back to Process Monitor and scroll all the way to the bottom of the list; make sure the Path and Result columns are displayed
There should be dozens of 'PATH NOT FOUND' and 'NAME NOT FOUND' Results in the list. For each one of these results, there should be a corresponding Path where MSOHelp was looking for the help file. Choose any one of these and create a file with that path name. I chose to create a copy of the help file from its original location to the new spot and rename it to match what MSOHelp was looking for.
My best guess is that the scrrun.dll contains the name of the help file and over the years the dll stayed the same but the help file was renamed, modified, etc.

Related

How to set silent_functions(1) as default in Octave? [duplicate]

I'm new to octave, and want to run a few commands on startup automatically every time it opens.
I typed "help startup" and saw "Octave uses the file ".octaverc". I did a bit of searching online at https://www.math.utah.edu/docs/info/octave_4.html, and saw the .octaverc file should be in the following path:
OCTAVE_HOME/lib/octave/VERSION/startup/octaverc
PROBLEM:
In that directory I don't have a startup folder, only "oct" and "site". I do see hidden files, which was my first thought since the file begins with "." character. So I then used Agent Ransack in the directory, and still nothing came up.
QUESTION:
1) Do I have to make the startup folder and octaverc file myself?
2) If so, does one, both or none have to be hidden?
3) Can it be a txt file, or does it have a special extension?
4) Do I just type the commands straight into the file or is there special formatting?
NOTE:
In case I'm going about this the wrong way, there are the operations I'd like to have run on startup:
PS1('>> '), addpath('D:\Users\Me\Desktop'), clc
Thanks ahead of time for the help!!
Possible locations (and their differences) for octaverc files are specified in the documentation.
In short, these are, from more general to specific:
octave-home/share/octave/site/m/startup/octaverc (most generic, for entire system)
octave-home/share/octave/version/m/startup/octaverc (to cover for more than one octave versions installed on the system, possibly requiring different startup scripts)
~/.octaverc (where ~ is unix-speak for a user's home directory -- covering for user-specific startup files)
.octaverc files in any directory, creating specific startup conditions for specific directories
octaverc files are effectively simple script files that are executed from most generic to most specific each time octave starts. Therefore, in the presence of conflicting commands, the more specific file can effectively be used to override the more generic behaviour.
Octave also supports (but does not recommend) the use of the startup.m file, for matlab compatibility.
You might also want to check out pathdef and savepath as well.
As a more general tip, if you ever want to search for a specific keyword from the documentation (e.g. octaverc), you can type this kind of search query in duckduckgo (or google):
octaverc site:https://octave.org/doc/interpreter/
(or just download the documentation as pdf and search the pdf)
Found the solution, the file was in the following path:
OCTAVE_HOME/share/octave/site/m/startup
to find out where OCTAVE_HOME is for you, just type "OCTAVE_HOME" into your Octave command line window.
ANSWERS:
1) You do not have to make a startup octaverc file yourself
2) The file is actually not hidden, so it should be easy to find given you're looking in the right place.
3) The file doesn't have an extension. It's just octaverc.
4) Under the last line of the existing file, you can just append commands as you would type them at the Octave command line window.
the last(7.3.0) octave version placed HERE:/ does not find the THERE:/openEMS/matlab directory even it is already loaded with octaverc or addpath. It keeps looking into the work dir where openEMS is not placed and does not recognize, for instance, the 'physical_constants.m' file.

Is it possible to change an .accde file icon to a custom image?

I am trying to make my Access (2013) application look less like Access and more like a "real" piece of software. One of the things I am trying to accomplish is changing the icon from the normal A/grid/lock to an image of my choosing.
Is this possible? If not really, what is my next best option?
Thanks!
You can change the icon that Access shows when running your database, it's under Options -> Current database.
You cannot change the icon that Explorer shows for your .accde file.
Of course you can create a shortcut with the commandline to MSACCESS.EXE and your database, and that shortcut can have a custom icon.
You may also be interested in this answer by Albert D. Kallal: https://stackoverflow.com/a/24638829/3820271
I just developed this method yesterday to allow an Access Executable to have a custom icon. It does involve making some additions to your computer's registry. Be aware I did this for Access 2010 on a Windows 7 machine. I have not tested this for windows 8 or 10, but I do think it will be the same.
I know the entries of .14 ONLY refer to Access 2010. Access 2013 should be .15 and Access 2016 should be .16.
When you export your "accde" registry entries to a .reg file, stick with the .14, .15, or .16 that is exported for your specific system. The only thing you will be changing is any occurrence of "accde" to "accxx" with the "xx" being your new letters for your chosen suffix for the Access executable database.
Below is the .reg file that will perform the registry "fixes" and I have included a few notes along the way. This is not for the beginner, but I do believe a seasoned Access developer should be able to follow. Are you a little uncomfortable with the registry? Use Google to help you find a write-up or two about the registry and how to make changes to the registry.
OK, the .reg file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.accVR]
"Content Type"="application/msaccess.exec"
#="Access.ACCVRFile.14"
[HKEY_CLASSES_ROOT\.accVR\Access.ACCVRFile.14]
[HKEY_CLASSES_ROOT\.accVR\Access.ACCVRFile.14\ShellNew]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR\OpenWithList]
"a"="MSACCESS.EXE"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR\OpenWithProgids]
"Access.accVRFile.14"=hex(0):
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14]
#="Microsoft Access ACCVR Database"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\CLSID]
#="{73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\DefaultIcon]
#="C:\\_Work\\VR\\VR Logo.ico"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell]
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell\Open]
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell\Open\command]
#="\"C:\\Program Files (x86)\\Microsoft Office\\Office14\\MSACCESS.EXE\" /NOSTARTUP \"%1\" %2 %3 %4 %5 %6 %7 %8 %9"
"command"=hex (7):79,00,6b,00,47,00,5e,00,56,00,35,00,21,00,21,00,21,00,21,00,\
21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,41,00,43,00,43,\
00,45,00,53,00,53,00,46,00,69,00,6c,00,65,00,73,00,3e,00,32,00,41,00,5a,00,\
7e,00,60,00,4f,00,37,00,71,00,43,00,3f,00,4f,00,57,00,2c,00,66,00,65,00,5a,\
00,79,00,63,00,78,00,68,00,20,00,2f,00,4e,00,4f,00,53,00,54,00,41,00,52,00,\
54,00,55,00,50,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,32,00,20,00,25,\
00,33,00,20,00,25,00,34,00,20,00,25,00,35,00,20,00,25,00,36,00,20,00,25,00,\
37,00,20,00,25,00,38,00,20,00,25,00,39,00,00,00,00,00
From top line down:
Any .reg file has to start with the correct name of the regedit.exe you will be dealing with. In this case I am dealing with Windows 7, therefore version 5.00.
The rest of the code in this file came straight out of the registry.
Within [HKEY_CLASSES_ROOT] I scrolled down to the entry ".accde"
Right click on this and select the "Export" option from the drop down menu.
Provide the folder and file name to export to.
Now you need to do the same within [HKEY_CURRENT_USER]. Here you will need to:
Scroll to Software, then Microsoft, then Windows, then CurrentVersion, then Explorer, then FileExts, and finally .accde.
Right click, select Export, etc.
And lastly, within the [HKEY_CLASSES_ROOT] scroll to "Access.ACCDEFile.14"
Right click on this and select the "Export" option, provide the saving info and save the file.
Put these three files together, leaving out the Windows Registry Editor Version line from the second and third files.
What I did from here was to create my own suffix rather than use the Microsoft .accde. I used the initials of the company this software is being written for. In this example, I will just use my own initials, VR. Keeping the ".acc" and just changing the "de" to whatever I will be using for the new suffix in order to use my custom icon.
You do not need to stay with only two characters.
In this new .reg file, carefully work your way through the file changing the "de" (or "DE") within any accordance of "accde" (or "ACCDE") you find.
For example, one of the places you will find "ACCDE" is in the string "[HKEY_CLASSES_ROOT\Access.ACCDEFile.14" Change the "DE" to "VR" (for this example) giving you the new string "[HKEY_CLASSES_ROOT\Access.ACCVRFile.14"
When you are finished, I suggest you search for the string "accde" within the file to be sure you have changed them all to the new suffix you are going to use.
Before using this .reg file to update your registry, BACKUP YOUR REGISTRY!!!

Open an external file with a button on a form in Access 2007

I am creating a database for my Unit (I am in the Army) and I need a button that will launch a file when clicked. The file is a .xfdl file used for military forms in a program called PureEdge. Is this possible and how would I go about doing it. I have searched it as much as I know how, but it seems that my Google-Fu is failing me.
Thanks for any help.
If the file type is associated with the program, that is, the file will launch when clicked, then FollowHyperlink may suit, otherwise, you may need to use Shell. For example:
Call Shell("""C:\Program Files\Microsoft Office\Office14\msaccess.exe"" ""c:\docs\db.mdb""", vbNormalFocus)

Why does the search function of my CHM file report "No topics found"?

I created a CHM help file using MadCap Flare. When I search for a term that I know is present in my text, the search function always reports "no topics found."
How can I fix the search function?
In my case the problem was fixed by registering itcc.dll on the machine where Flare is installed (the machine building the CHM.)
C:\> regsvr32 itcc.dll
The file is included with MadCap Flare as well as the Microsoft HTML Help Workshop.
I have also found an article indicating that the language setting of the help file can affect the search function.
Here is the Getting Started Guide. Chapter 4 has a section about Search, which might prove useful.

How do you open a hxs file?

I understand that a hxs file is a compiled help file, a replacement for .chm files, but I can't seem to open them.
I've read that you read them with the help explorer, dexplore.exe found here:
C:\Program Files\Common Files\microsoft shared\Help 9\dexplore.exe
When I try opening the file with dexplore, it asks me to save the file to disk, or open with another program.
Any ideas?
Not sure if you want to look through them programmatically or with some tool, but Help Explorer can open hxs files and extract contents. CHM files (the precursor to hxs) were a custom binary format with indexing and other data at the beginning of the file, and a zip archive in the rest.
You can also decompile hxs using HxComp.exe
EDIT: That link appears to be broken/down or something, but your answer did lead me to find Help Explorer Viewer, which may or may not be the same program, but it does the job.
Edit: I've deleted all broken links to spare confusion.
After a bit more research, it looks like these files must be installed into the IDE when you install 3rd party tools. There is a diagnostic tool called Namespace#. You can see details about it here:
http://code.msdn.microsoft.com/NamespaceSharp
HXS file extension - Microsoft Help compiled storage file. It is only one among the: HxI, HxS, HxC, HxT, HxK witch is known as MS HTML Help 2.
Help Explorer Viewer may be used to open this file.