Is it possible to print certain Registry Keys to a Text File?
Say I have this one:
SaveSetting "BRT", "Company"
and i want to print all the registry Keys that fall under that. How would I do that?
Is it possible to print certain Registry Keys to a Text File?
Say I have this one:
SaveSetting "BRT", "Company"
and i want to print all the registry Keys that fall under that. How would I do that?
Why do you want to use the registry; are you familiar with customdocumentproperties ?
Actually I do not. Currently I use the Registry for saving user settings for my excel addin
Is this possible to do? I think it is - I just do not have any idea how I would do it.
Open workbook/ menu bar/ file/ properties/ tab 'adapte /adjuste'
There you can store any information you want to store.
in VBA :
Please Login or Register to view this content.
Last edited by snb; 07-12-2011 at 11:41 AM.
I do not think that would help me because I create an add-in that multiple use on any workbook. So what I need to do is be able to print the Registry strings to a text file if possible.
I think you misunderstood me. The customdocumentproperties will be put into the addin.
Hello djblois1,
While VBA provides the tools to save information to the registry, it does not provide a built-in method to retrieve the all values and theirs settings at once. Seems to be another of those "WTF were they thinking!" moments when you realize they did not include such a tool.
All is not lost. I have created a macro that returns all the values and the settings for a registry key. A 1 dimensional zero based string array is returned that contains the value name, the registry data type (helpful if the data needs to converted back), and the data for each entry. Each section of the string is separated by a tab character, since this is rarely used in the registry.
A second macro will print this information into a text file. You will need to change the file's path and file's name to what you want use. Due to length of this post, I have to post the second macro in a following post.
Because this macro uses Windows API calls to the registry, please do not attempt to alter the code if it does not work. If you do change the code then you could crash the computer, corrupt the registry, and not be able to reboot.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Hello djblois1,
Here is the macro to print the registry vlaues and settings to a text file. Be sure to change the file's path and name (marked in bold) to what you will be using.
Macro to Save Registry Values and Settings to a Text File
Please Login or Register to view this content.
Last edited by Leith Ross; 07-13-2011 at 12:59 AM.
snb,
Just curious, will the Document properties save individually for each user? Also, can I read, write, and print from it easily?
Just bumping back up
To give an impression of creating, reading & changing a documentproperty in an AddIn.
Assuming the AddIn "example.xla" has been loaded:
Please Login or Register to view this content.
Last edited by snb; 07-15-2011 at 11:23 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks