Registry Setting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Helen Trim

    #1

    Registry Setting

    I want to clear the header and footer that are printed when a page is printed
    from Internet Explorer. I have added the following code:
    Dim regPageSetup As Microsoft.Win32 .RegistryKey
    regPageSetup =
    Microsoft.Win32 .Registry.Curre ntUser.OpenSubK ey("Software\Mi crosoft\Interne t
    Explorer\PageSe tup", True)
    If (Not regPageSetup Is Nothing) Then
    regPageSetup.Se tValue("Footer" , "")
    regPageSetup.Se tValue("Header" , "")
    regPageSetup.Cl ose()
    End If

    However this doesn't change the setting for the Current User key, but it
    does change the setting for the Users key. I have tried all the possible
    choices for keys, eg Microsoft.Win32 .Registry.Curre ntConfig, and only the
    CurrentUser one gets past the If statement. But this doesn't change the bit
    I need changed, it still prints out the heading.

    Any ideas?

    --
    Helen
  • Amit Bahree

    #2
    Re: Registry Setting

    To the best of my knowledge this can be turned off in File =>Page Setup
    of IE.

    "Helen Trim" <HelenTrim@disc ussions.microso ft.com> wrote in message
    news:HelenTrim@ discussions.mic rosoft.com:
    [color=blue]
    > I want to clear the header and footer that are printed when a page is printed
    > from Internet Explorer. I have added the following code:
    > Dim regPageSetup As Microsoft.Win32 .RegistryKey
    > regPageSetup =
    > Microsoft.Win32 .Registry.Curre ntUser.OpenSubK ey("Software\Mi crosoft\Interne t
    > Explorer\PageSe tup", True)
    > If (Not regPageSetup Is Nothing) Then
    > regPageSetup.Se tValue("Footer" , "")
    > regPageSetup.Se tValue("Header" , "")
    > regPageSetup.Cl ose()
    > End If
    >
    > However this doesn't change the setting for the Current User key, but it
    > does change the setting for the Users key. I have tried all the possible
    > choices for keys, eg Microsoft.Win32 .Registry.Curre ntConfig, and only the
    > CurrentUser one gets past the If statement. But this doesn't change the bit
    > I need changed, it still prints out the heading.
    >
    > Any ideas?
    >
    > --
    > Helen[/color]

    Comment

    • Helen Trim

      #3
      Re: Registry Setting

      Thanks, but I did already know that! I'm designing for users who are not
      computer literate so I wanted to do it programatically .
      --
      Helen


      "Amit Bahree" wrote:
      [color=blue]
      > To the best of my knowledge this can be turned off in File =>Page Setup
      > of IE.
      >
      > "Helen Trim" <HelenTrim@disc ussions.microso ft.com> wrote in message
      > news:HelenTrim@ discussions.mic rosoft.com:
      >[color=green]
      > > I want to clear the header and footer that are printed when a page is printed
      > > from Internet Explorer. I have added the following code:
      > > Dim regPageSetup As Microsoft.Win32 .RegistryKey
      > > regPageSetup =
      > > Microsoft.Win32 .Registry.Curre ntUser.OpenSubK ey("Software\Mi crosoft\Interne t
      > > Explorer\PageSe tup", True)
      > > If (Not regPageSetup Is Nothing) Then
      > > regPageSetup.Se tValue("Footer" , "")
      > > regPageSetup.Se tValue("Header" , "")
      > > regPageSetup.Cl ose()
      > > End If
      > >
      > > However this doesn't change the setting for the Current User key, but it
      > > does change the setting for the Users key. I have tried all the possible
      > > choices for keys, eg Microsoft.Win32 .Registry.Curre ntConfig, and only the
      > > CurrentUser one gets past the If statement. But this doesn't change the bit
      > > I need changed, it still prints out the heading.
      > >
      > > Any ideas?
      > >
      > > --
      > > Helen[/color]
      >
      >[/color]

      Comment

      • dick rider

        #4
        Re: Registry Setting



        Helen, did you get an answer - I am having the same issue

        Thanks
        DR

        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        Working...