Solved

WebBrowser: setting header and footer

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

948 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

21 Experts available now in Live!

Get 1:1 Help Now