vba word regstry editor

leumruk

New Member
Joined
Dec 3, 2011
Messages
8
Hi,
Is it possible to do with the action specified in the macro?
Code:
Code:
Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\Word.Document.8] 
@="Microsoft Word Document" 
"EditFlags"=dword:00010000
"BrowserFlags"=dword:00000008
Manual is the expression.
http://support.microsoft.com/kb/254918
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I want the job without the picture.

12f3z.jpg
 
Upvote 0
The required code is under the heading "Saving a Registry key:" at the link I gave you.

I'm not about to test the code on my own system, as I don't want to change it. With that caveat, and the warning at the link I posted, you might try:
Code:
Sub IE_Open_Word()
Dim myWS As Object
Const i_RegKey As String = "HKEY_CLASSES_ROOT\Word.Picture.8"
Const i_Value As String = "BrowserFlags"
Const i_Type As String = "00000008"

  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'write registry key
  myWS.RegWrite i_RegKey, i_Value, i_Type

End Sub
I also question the need for such code, as the MS website shows how to do this manually and it should only ever need to be done once.
 
Upvote 0
I found a solution. Approval is not better.

12vf7.jpg

Code:
Sub Reg_Ayari()
bir = "Windows Registry Editor Version 5.00"
iki = "[HKEY_CLASSES_ROOT\Word.Document.8]"
Uc = "@=" & """Microsoft Word Document"""
dort = """EditFlags""" & "=dword:00000000" '"=dword:00010000"
bes = """BrowserFlags""" & "=dword:00000000" '"=dword:00000008"
yol = ThisWorkbook.Path & "\"
Ad = "rgty.reg"
  Open yol & Ad For Output As #1
        Print #1, bir
        Print #1, iki
        Print #1, Uc
        Print #1, dort
        Print #1, bes
  Close #1
  CreateObject("Shell.Application").Open yol & Ad
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,609
Messages
6,185,969
Members
453,333
Latest member
BioCoder84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top