Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Delete in Registry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ulf Nilsson - 21 Feb 2005 09:54 GMT
Hi,
I add the key by using:
System.PrivateProfileString
(Empty, "HKEY_CURRENT_USER\Software\Apps\AV_Word", "Settin
gs") = "ABC"

How do I delete this key in the registry? I do not just
want to set it to empty.

I have tried DeleteSetting, but it does not seem to work
for me.

/ Ulf
Word Heretic - 22 Feb 2005 02:32 GMT
G'day "Ulf Nilsson" <anonymous@discussions.microsoft.com>,

The VBA Developer's Handbook by Ken Getz et al has loads of stuff on
this.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Ulf Nilsson reckoned:

>Hi,
>I add the key by using:
[quoted text clipped - 9 lines]
>
>/ Ulf
Ulf Nilsson - 22 Feb 2005 08:15 GMT
And the answer is ...

/ Ulf

>-----Original Message-----
>G'day "Ulf Nilsson" <anonymous@discussions.microsoft.com>,
[quoted text clipped - 12 lines]
>>I add the key by using:
>>System.PrivateProfileString

(Empty, "HKEY_CURRENT_USER\Software\Apps\AV_Word", "Settin
>>gs") = "ABC"
>>
[quoted text clipped - 7 lines]
>
>.
Word Heretic - 22 Feb 2005 11:49 GMT
G'day "Ulf Nilsson" <anonymous@discussions.microsoft.com>,

Very long and available in a book for purchase. If you would care to
pay me I might give more of one...

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Ulf Nilsson reckoned:

>And the answer is ...
>
[quoted text clipped - 33 lines]
>>
>>.
Jonathan West - 22 Feb 2005 10:42 GMT
Hi Ulf,

There is nothing in the built-in commands in VBA that will do this. The
System.PrivateProfileString property won't delete keys, and the SaveSetting,
DeleteSetting command sonly work on a small area of the registry

You can use Karl Peterson's RegSettings code available from
http://vb.mvps.org/samples/project.asp?id=RegSettings

This module provides an equivalent of DeleteSetting etc but which can be
applied to any key amd not just the ones within the area that the built-in
commands can access.

It was written in VB rather than VBA, but don't worry, you can drop the
CRegSettings.cls class module straight into your Word VBA project and it
will work.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

> Hi,
> I add the key by using:
[quoted text clipped - 9 lines]
>
> / Ulf
Ulf Nilsson - 22 Feb 2005 11:55 GMT
Thanks!

/ Ulf

>-----Original Message-----
>Hi Ulf,
[quoted text clipped - 17 lines]
>> I add the key by using:
>> System.PrivateProfileString

(Empty, "HKEY_CURRENT_USER\Software\Apps\AV_Word", "Settin
>> gs") = "ABC"
>>
[quoted text clipped - 7 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.