Solved

WebBrowser: setting header and footer

Posted on 1999-01-12
5
1,154 Views
Last Modified: 2013-12-25
Is it possible to set header/footer of a html file shown in WebBrowser control? I want to set header/footer to "" (none). I already know that using this code it is possible:

WebBrowser1.ExecWB OLECMDID_PAGESETUP, OLECMDEXECOPT_PROMPTUSER

But, every time that I have to print the file shown, I have to set header/footer again. Is it possible to set it forever, and without prompting user with the dialogbox that apears?

Thanks!
0
Comment
Question by:ppaulinolopes
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:ameba
ID: 1489602
Go to PageSetup in IE. Delete text for header and footer.

Or, via VB. Just modify registry setting.
To find where is this setting, set header to "eeee".

Then, press start, run, and type regedit. Press Enter to start regedit.
Start search for "eeee".
When you know location in registry, use your code to modify setting, e.g:
Reading and Writing of Registry Information
http://www.experts-exchange.com/Q.10108254
or any other PAQ.
0
 

Author Comment

by:ppaulinolopes
ID: 1489603
Okay, I found location of "eeee" in registry. Well, I am not a professional VB user. How can I modify this registry via VB?Please, send me a sample code...... thanks!
0
 
LVL 15

Expert Comment

by:ameba
ID: 1489604
Now, that you know the registry key
See this PAQ:
Reading and Writing of Registry Information

http://www.experts-exchange.com/Q.10108254
(paste this address to your browser and buy answer, I think it is 10 points)

or any other answered question. There are many PAQs that describe this.
0
 

Author Comment

by:ppaulinolopes
ID: 1489605
Hey, ameba.... Now I am able to set header and footer thruw registry setting.


(I can't give you credits if the question was rejected 'a priori'. I am waiting for your next proposed answer to give you the credits. e.i. Propose me a simply thanks!)
0
 
LVL 15

Accepted Solution

by:
ameba earned 300 total points
ID: 1489606
Hi, ppaulinolopes
Thanks!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question