Solved

WebBrowser: setting header and footer

Posted on 1999-01-12
5
1,149 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now