473,289 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

WebBrowser Control Printing

Greetings,

(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).

I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...

I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so far.

I need to include a custom header/footer (imported from another HTML file)
on every page that's printed. I also need to draw a border around each
page. The closest I can get to the border is putting all my print-content
inside an HTML table, which looks ugly because it doesn't close off at the
foot of each page - it only draws its final horizontal line at the very end
of the document.

I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site, but
it's all in C++ and seems designed around MFC.

How can I hang on to the snazzy built-in formatting features of HTML, but
still have control over the printed output & pagination? Help!

Thanks in advance,
Alex Clark


Mar 9 '06 #1
12 6302
Alex,

I suggest you look into Print Templates:

http://msdn.microsoft.com/library/de...intpreview.asp

http://msdn.microsoft.com/library/de...asp?frame=true

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Greetings,

(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).

I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...

I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so far.

I need to include a custom header/footer (imported from another HTML file)
on every page that's printed. I also need to draw a border around each
page. The closest I can get to the border is putting all my print-content
inside an HTML table, which looks ugly because it doesn't close off at the
foot of each page - it only draws its final horizontal line at the very
end of the document.

I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site,
but it's all in C++ and seems designed around MFC.

How can I hang on to the snazzy built-in formatting features of HTML, but
still have control over the printed output & pagination? Help!

Thanks in advance,
Alex Clark

Mar 9 '06 #2
Hi Colin,

These look really useful but the article seems to imply that this is only
possible when using C++. I know it was written a long time ago (before
..NET) but it doesn't seem as though it could be very VB.NET friendly :-(

Thanks,
Alex

"Colin Neller" <cn*****@gmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Alex,

I suggest you look into Print Templates:

http://msdn.microsoft.com/library/de...intpreview.asp

http://msdn.microsoft.com/library/de...asp?frame=true

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Greetings,

(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).

I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...

I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so far.

I need to include a custom header/footer (imported from another HTML
file) on every page that's printed. I also need to draw a border around
each page. The closest I can get to the border is putting all my
print-content inside an HTML table, which looks ugly because it doesn't
close off at the foot of each page - it only draws its final horizontal
line at the very end of the document.

I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site,
but it's all in C++ and seems designed around MFC.

How can I hang on to the snazzy built-in formatting features of HTML, but
still have control over the printed output & pagination? Help!

Thanks in advance,
Alex Clark


Mar 9 '06 #3
Alex,

Print Templates are certainly non-trivial, but they do not require C++. The
key line of code from the example I gave is:

pCmdTarg->Exec(&CGID_MSHTML,
IDM_PRINT,
OLECMDEXECOPT_PROMPTUSER,
&vTemplatePath,
NULL);

Basically, what you would do in .NET is cast your IWebBrowser2 object to an
IOleCommandTarget and call the Exec method (as above) passing in the path to
your print template (vTemplatePath in the above example.) The vast majority
of the Print Template code will be written in JavaScript.

Honestly, I think you would be better investing in a report writing tool
(e.g. ActiveReports) The path you are headed down with the WB is not an
easy one.

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Colin,

These look really useful but the article seems to imply that this is only
possible when using C++. I know it was written a long time ago (before
.NET) but it doesn't seem as though it could be very VB.NET friendly :-(

Thanks,
Alex

"Colin Neller" <cn*****@gmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Alex,

I suggest you look into Print Templates:

http://msdn.microsoft.com/library/de...intpreview.asp

http://msdn.microsoft.com/library/de...asp?frame=true

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Greetings,

(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).

I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...

I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so
far.

I need to include a custom header/footer (imported from another HTML
file) on every page that's printed. I also need to draw a border around
each page. The closest I can get to the border is putting all my
print-content inside an HTML table, which looks ugly because it doesn't
close off at the foot of each page - it only draws its final horizontal
line at the very end of the document.

I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site,
but it's all in C++ and seems designed around MFC.

How can I hang on to the snazzy built-in formatting features of HTML,
but still have control over the printed output & pagination? Help!

Thanks in advance,
Alex Clark



Mar 9 '06 #4
Hi Colin,

After further investigation on the web I'm still fairly convinced this is a
C++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed as
of 2.0.

I think you're right about the report-writing avenue however. It's a shame,
as what I'm trying to do would be ideally suited to generating a quick HTML
file and printing it, if only I could have slightly more control over the
printed output :-(

Thanks for your help,
Alex Clark


"Colin Neller" <cn*****@gmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Alex,

Print Templates are certainly non-trivial, but they do not require C++.
The key line of code from the example I gave is:

pCmdTarg->Exec(&CGID_MSHTML,
IDM_PRINT,
OLECMDEXECOPT_PROMPTUSER,
&vTemplatePath,
NULL);

Basically, what you would do in .NET is cast your IWebBrowser2 object to
an IOleCommandTarget and call the Exec method (as above) passing in the
path to your print template (vTemplatePath in the above example.) The
vast majority of the Print Template code will be written in JavaScript.

Honestly, I think you would be better investing in a report writing tool
(e.g. ActiveReports) The path you are headed down with the WB is not an
easy one.

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Colin,

These look really useful but the article seems to imply that this is only
possible when using C++. I know it was written a long time ago (before
.NET) but it doesn't seem as though it could be very VB.NET friendly :-(

Thanks,
Alex

"Colin Neller" <cn*****@gmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Alex,

I suggest you look into Print Templates:

http://msdn.microsoft.com/library/de...intpreview.asp

http://msdn.microsoft.com/library/de...asp?frame=true

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Greetings,

(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).

I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...

I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so
far.

I need to include a custom header/footer (imported from another HTML
file) on every page that's printed. I also need to draw a border
around each page. The closest I can get to the border is putting all
my print-content inside an HTML table, which looks ugly because it
doesn't close off at the foot of each page - it only draws its final
horizontal line at the very end of the document.

I tried inheriting from WebBrowser and overriding the OnPrint event,
but this never seems to get called? I've found an example on the MSDN
site, but it's all in C++ and seems designed around MFC.

How can I hang on to the snazzy built-in formatting features of HTML,
but still have control over the printed output & pagination? Help!

Thanks in advance,
Alex Clark




Mar 9 '06 #5
Hi Alex,
Thanks for your response!
After further investigation on the web I'm still fairly convinced this is aC++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed as.of 2.0.
WebBrowser control provide us IWebBrowser2 com-interface and we can use
this interface to control WebBrowser control's operation. IWebBrowser2 is
an IDispatch interface, in a word, this is a dual-interface, so we can use
it in C++ and VB. If your environment is .Net, we could use it with
Interoperability mechanism. I hope the following articles will be helpful
for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Title: Using MSHTML Advanced Hosting Interfaces
URL: http://www.codeproject.com/csharp/advhost.asp

Title: Microsoft Web Browser Automation using C#
URL: http://www.codeproject.com/csharp/mshtml_automation.asp

I hope the above information is helpful for you. If there is anything I
can do for you, please feel free to let me know. Thanks and have a nice day!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl> <e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>Subject: Re: WebBrowser Control Printing
Date: Thu, 9 Mar 2006 16:22:23 -0000
Lines: 116
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Message-ID: <e7**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host86-134-248-72.range86-134.btcentralplus.com 86.134.248.72Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321151
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Colin,

After further investigation on the web I'm still fairly convinced this is aC++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed as
of 2.0.

I think you're right about the report-writing avenue however. It's a shame,as what I'm trying to do would be ideally suited to generating a quick HTMLfile and printing it, if only I could have slightly more control over the
printed output :-(

Thanks for your help,
Alex Clark


"Colin Neller" <cn*****@gmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Alex,

Print Templates are certainly non-trivial, but they do not require C++.
The key line of code from the example I gave is:

pCmdTarg->Exec(&CGID_MSHTML,
IDM_PRINT,
OLECMDEXECOPT_PROMPTUSER,
&vTemplatePath,
NULL);

Basically, what you would do in .NET is cast your IWebBrowser2 object to
an IOleCommandTarget and call the Exec method (as above) passing in the
path to your print template (vTemplatePath in the above example.) The
vast majority of the Print Template code will be written in JavaScript.

Honestly, I think you would be better investing in a report writing tool
(e.g. ActiveReports) The path you are headed down with the WB is not an
easy one.

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Colin,

These look really useful but the article seems to imply that this is only possible when using C++. I know it was written a long time ago (before
.NET) but it doesn't seem as though it could be very VB.NET friendly :-(

Thanks,
Alex

"Colin Neller" <cn*****@gmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Alex,

I suggest you look into Print Templates:

http://msdn.microsoft.com/library/de...us/dnie55/html
/beyondprintpreview.asp
http://msdn.microsoft.com/library/de...us/dnie55/html
/printtemplate2.asp?frame=true
--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Greetings,
>
> (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
>
> I've decided to take advantage of the layout characteristics of HTML
> documents to simplify my printing tasks, but of course it's thrown up a> whole host of new issues...
>
> I'm generating a multi page printable document in HTML from my app, and> displaying it in a WebBrowser control. I've looked into using some CSS> commands to control pagination, but nothing seems to fit the bill so
> far.
>
> I need to include a custom header/footer (imported from another HTML
> file) on every page that's printed. I also need to draw a border
> around each page. The closest I can get to the border is putting all
> my print-content inside an HTML table, which looks ugly because it
> doesn't close off at the foot of each page - it only draws its final
> horizontal line at the very end of the document.
>
> I tried inheriting from WebBrowser and overriding the OnPrint event,
> but this never seems to get called? I've found an example on the MSDN> site, but it's all in C++ and seems designed around MFC.
>
> How can I hang on to the snazzy built-in formatting features of HTML,
> but still have control over the printed output & pagination? Help!
>
> Thanks in advance,
> Alex Clark
>
>
>
>




Mar 14 '06 #6
Hi Terry,

Any chance you could give me some example code in either C# or VB.NET for
using Print Templates with the WebBrowser control? I'm using .NET 2.0 and
my clients will have IE6 installed as a minimum. A simple example just to
get me started would be much appreciated.

Many thanks,
Alex
""TerryFei"" <v-******@online.microsoft.com> wrote in message
news:np**************@TK2MSFTNGXA03.phx.gbl...
Hi Alex,
Thanks for your response!
After further investigation on the web I'm still fairly convinced this is aC++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed as.of 2.0. WebBrowser control provide us IWebBrowser2 com-interface and we can use
this interface to control WebBrowser control's operation. IWebBrowser2 is
an IDispatch interface, in a word, this is a dual-interface, so we can use
it in C++ and VB. If your environment is .Net, we could use it with
Interoperability mechanism. I hope the following articles will be helpful
for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Title: Using MSHTML Advanced Hosting Interfaces
URL: http://www.codeproject.com/csharp/advhost.asp

Title: Microsoft Web Browser Automation using C#
URL: http://www.codeproject.com/csharp/mshtml_automation.asp

I hope the above information is helpful for you. If there is anything I
can do for you, please feel free to let me know. Thanks and have a nice
day!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl>

<e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
Subject: Re: WebBrowser Control Printing
Date: Thu, 9 Mar 2006 16:22:23 -0000
Lines: 116
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Message-ID: <e7**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host86-134-248-72.range86-134.btcentralplus.com

86.134.248.72
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321151
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Colin,

After further investigation on the web I'm still fairly convinced this is

a
C++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed as
of 2.0.

I think you're right about the report-writing avenue however. It's a

shame,
as what I'm trying to do would be ideally suited to generating a quick

HTML
file and printing it, if only I could have slightly more control over the
printed output :-(

Thanks for your help,
Alex Clark


"Colin Neller" <cn*****@gmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Alex,

Print Templates are certainly non-trivial, but they do not require C++.
The key line of code from the example I gave is:

pCmdTarg->Exec(&CGID_MSHTML,
IDM_PRINT,
OLECMDEXECOPT_PROMPTUSER,
&vTemplatePath,
NULL);

Basically, what you would do in .NET is cast your IWebBrowser2 object to
an IOleCommandTarget and call the Exec method (as above) passing in the
path to your print template (vTemplatePath in the above example.) The
vast majority of the Print Template code will be written in JavaScript.

Honestly, I think you would be better investing in a report writing tool
(e.g. ActiveReports) The path you are headed down with the WB is not an
easy one.

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Colin,

These look really useful but the article seems to imply that this is

only possible when using C++. I know it was written a long time ago (before
.NET) but it doesn't seem as though it could be very VB.NET friendly
:-(

Thanks,
Alex

"Colin Neller" <cn*****@gmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
> Alex,
>
> I suggest you look into Print Templates:
>
> http://msdn.microsoft.com/library/de...us/dnie55/html
/beyondprintpreview.asp>
> http://msdn.microsoft.com/library/de...us/dnie55/html
/printtemplate2.asp?frame=true>
> --
> Colin Neller
> http://www.colinneller.com/blog
>
>
> "Alex Clark" <ho*******@newsgroups.nospam> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
>> Greetings,
>>
>> (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
>>
>> I've decided to take advantage of the layout characteristics of HTML
>> documents to simplify my printing tasks, but of course it's thrown up a>> whole host of new issues...
>>
>> I'm generating a multi page printable document in HTML from my app, and>> displaying it in a WebBrowser control. I've looked into using some CSS>> commands to control pagination, but nothing seems to fit the bill so
>> far.
>>
>> I need to include a custom header/footer (imported from another HTML
>> file) on every page that's printed. I also need to draw a border
>> around each page. The closest I can get to the border is putting all
>> my print-content inside an HTML table, which looks ugly because it
>> doesn't close off at the foot of each page - it only draws its final
>> horizontal line at the very end of the document.
>>
>> I tried inheriting from WebBrowser and overriding the OnPrint event,
>> but this never seems to get called? I've found an example on the MSDN>> site, but it's all in C++ and seems designed around MFC.
>>
>> How can I hang on to the snazzy built-in formatting features of HTML,
>> but still have control over the printed output & pagination? Help!
>>
>> Thanks in advance,
>> Alex Clark
>>
>>
>>
>>
>
>


Mar 15 '06 #7
Hi Alex,
After researching, we can use WebBrowser to print, just like the following
code:
m_axWebBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PR INT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,
ref o, ref o);

I also the following article will be helpful for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Thanks for your understanding!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl> <e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
<e7**************@TK2MSFTNGP12.phx.gbl>
<np**************@TK2MSFTNGXA03.phx.gbl>Subject: Re: WebBrowser Control Printing
Date: Wed, 15 Mar 2006 11:44:28 -0000
Lines: 207
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <uY**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host81-152-10-23.range81-152.btcentralplus.com 81.152.10.23Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321889
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Terry,

Any chance you could give me some example code in either C# or VB.NET for
using Print Templates with the WebBrowser control? I'm using .NET 2.0 and
my clients will have IE6 installed as a minimum. A simple example just to
get me started would be much appreciated.

Many thanks,
Alex
""TerryFei"" <v-******@online.microsoft.com> wrote in message
news:np**************@TK2MSFTNGXA03.phx.gbl...
Hi Alex,
Thanks for your response!
After further investigation on the web I'm still fairly convinced this is
a
C++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed

as
.of 2.0.

WebBrowser control provide us IWebBrowser2 com-interface and we can use
this interface to control WebBrowser control's operation. IWebBrowser2 is
an IDispatch interface, in a word, this is a dual-interface, so we can use it in C++ and VB. If your environment is .Net, we could use it with
Interoperability mechanism. I hope the following articles will be helpful
for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Title: Using MSHTML Advanced Hosting Interfaces
URL: http://www.codeproject.com/csharp/advhost.asp

Title: Microsoft Web Browser Automation using C#
URL: http://www.codeproject.com/csharp/mshtml_automation.asp

I hope the above information is helpful for you. If there is anything I
can do for you, please feel free to let me know. Thanks and have a nice
day!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl>

<e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
Subject: Re: WebBrowser Control Printing
Date: Thu, 9 Mar 2006 16:22:23 -0000
Lines: 116
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Message-ID: <e7**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host86-134-248-72.range86-134.btcentralplus.com

86.134.248.72
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321151
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Colin,

After further investigation on the web I'm still fairly convinced this is

a
C++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed
asof 2.0.

I think you're right about the report-writing avenue however. It's a

shame,
as what I'm trying to do would be ideally suited to generating a quick

HTML
file and printing it, if only I could have slightly more control over the
printed output :-(

Thanks for your help,
Alex Clark


"Colin Neller" <cn*****@gmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Alex,

Print Templates are certainly non-trivial, but they do not require C++.
The key line of code from the example I gave is:

pCmdTarg->Exec(&CGID_MSHTML,
IDM_PRINT,
OLECMDEXECOPT_PROMPTUSER,
&vTemplatePath,
NULL);

Basically, what you would do in .NET is cast your IWebBrowser2 object to an IOleCommandTarget and call the Exec method (as above) passing in the
path to your print template (vTemplatePath in the above example.) The
vast majority of the Print Template code will be written in JavaScript.

Honestly, I think you would be better investing in a report writing tool (e.g. ActiveReports) The path you are headed down with the WB is not an easy one.

--
Colin Neller
http://www.colinneller.com/blog
"Alex Clark" <ho*******@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Hi Colin,
>
> These look really useful but the article seems to imply that this is

only
> possible when using C++. I know it was written a long time ago (before> .NET) but it doesn't seem as though it could be very VB.NET friendly
> :-(
>
> Thanks,
> Alex
>
>
>
> "Colin Neller" <cn*****@gmail.com> wrote in message
> news:e6**************@tk2msftngp13.phx.gbl...
>> Alex,
>>
>> I suggest you look into Print Templates:
>>
>>

http://msdn.microsoft.com/library/de...us/dnie55/html /beyondprintpreview.asp
>>
>>

http://msdn.microsoft.com/library/de...us/dnie55/html /printtemplate2.asp?frame=true
>>
>> --
>> Colin Neller
>> http://www.colinneller.com/blog
>>
>>
>> "Alex Clark" <ho*******@newsgroups.nospam> wrote in message
>> news:%2****************@tk2msftngp13.phx.gbl...
>>> Greetings,
>>>
>>> (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
>>>
>>> I've decided to take advantage of the layout characteristics of HTML
>>> documents to simplify my printing tasks, but of course it's thrown up
a
>>> whole host of new issues...
>>>
>>> I'm generating a multi page printable document in HTML from my app,

and
>>> displaying it in a WebBrowser control. I've looked into using some

CSS
>>> commands to control pagination, but nothing seems to fit the bill so
>>> far.
>>>
>>> I need to include a custom header/footer (imported from another HTML
>>> file) on every page that's printed. I also need to draw a border
>>> around each page. The closest I can get to the border is putting

all>>> my print-content inside an HTML table, which looks ugly because it
>>> doesn't close off at the foot of each page - it only draws its final
>>> horizontal line at the very end of the document.
>>>
>>> I tried inheriting from WebBrowser and overriding the OnPrint event,
>>> but this never seems to get called? I've found an example on the

MSDN
>>> site, but it's all in C++ and seems designed around MFC.
>>>
>>> How can I hang on to the snazzy built-in formatting features of HTML,>>> but still have control over the printed output & pagination? Help!
>>>
>>> Thanks in advance,
>>> Alex Clark
>>>
>>>
>>>
>>>
>>
>>
>
>




Mar 16 '06 #8
Hi Terry,

A few problems with this:

1) I'm using .NET 2.0 and would very much prefer to use the managed
WebBrowser control. Not so hard, as presumably I just need to call ExecWB
of the late-bound ActiveXInstance property?

2) Testing this example with the ActiveX version of the web-browser (i.e.
not using the managed control from 2.0), it does absolutely nothing at all.
I'm on XP Pro SP2 with IE6 and all latest service packs.

3) Printing in itself wasn't the problem to start with - getting the
web-browser control to print with a Print-Template from within a VB.NET
application is the problem I'm facing.

Please see:
http://msdn.microsoft.com/library/de...intpreview.asp
....for an example of what I'm talking about.
Essentially I need a custom header, footer, and border around every HTML
page I'm printing from within my VB.NET WinForms application, running on
v2.0 of the framework.

IE Print Templates seem to be the only way to go on this. Can you give me
some example VB.NET (or C#) code that illustrates how to use print templates
with the managed web-browser control, if it's even possible?

Thanks,
Alex Clark



""TerryFei"" <v-******@online.microsoft.com> wrote in message
news:Pp**************@TK2MSFTNGXA03.phx.gbl...
Hi Alex,
After researching, we can use WebBrowser to print, just like the following
code:
m_axWebBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PR INT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,
ref o, ref o);

I also the following article will be helpful for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Thanks for your understanding!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl>

<e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
<e7**************@TK2MSFTNGP12.phx.gbl>
<np**************@TK2MSFTNGXA03.phx.gbl>
Subject: Re: WebBrowser Control Printing
Date: Wed, 15 Mar 2006 11:44:28 -0000
Lines: 207
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <uY**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host81-152-10-23.range81-152.btcentralplus.com

81.152.10.23
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321889
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Terry,

Any chance you could give me some example code in either C# or VB.NET for
using Print Templates with the WebBrowser control? I'm using .NET 2.0 and
my clients will have IE6 installed as a minimum. A simple example just to
get me started would be much appreciated.

Many thanks,
Alex
""TerryFei"" <v-******@online.microsoft.com> wrote in message
news:np**************@TK2MSFTNGXA03.phx.gbl...
Hi Alex,
Thanks for your response!

>After further investigation on the web I'm still fairly convinced this is a
>C++ only option, due to the wrapping of COM Variant types - .NET
>interop
>will, apparently, not support this at all, unless something has changed
as
>.of 2.0.
WebBrowser control provide us IWebBrowser2 com-interface and we can use
this interface to control WebBrowser control's operation. IWebBrowser2
is
an IDispatch interface, in a word, this is a dual-interface, so we can use it in C++ and VB. If your environment is .Net, we could use it with
Interoperability mechanism. I hope the following articles will be
helpful
for you:
Title: Using the WebBrowser control in .NET
URL: http://www.codeproject.com/csharp/webbrowser.asp

Title: Using MSHTML Advanced Hosting Interfaces
URL: http://www.codeproject.com/csharp/advhost.asp

Title: Microsoft Web Browser Automation using C#
URL: http://www.codeproject.com/csharp/mshtml_automation.asp

I hope the above information is helpful for you. If there is anything I
can do for you, please feel free to let me know. Thanks and have a nice
day!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl>
<e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
Subject: Re: WebBrowser Control Printing
Date: Thu, 9 Mar 2006 16:22:23 -0000
Lines: 116
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Message-ID: <e7**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host86-134-248-72.range86-134.btcentralplus.com
86.134.248.72
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:321151
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Colin,

After further investigation on the web I'm still fairly convinced this
is
a
C++ only option, due to the wrapping of COM Variant types - .NET interop
will, apparently, not support this at all, unless something has changed asof 2.0.

I think you're right about the report-writing avenue however. It's a
shame,
as what I'm trying to do would be ideally suited to generating a quick
HTML
file and printing it, if only I could have slightly more control over
the
printed output :-(

Thanks for your help,
Alex Clark


"Colin Neller" <cn*****@gmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl.. .
> Alex,
>
> Print Templates are certainly non-trivial, but they do not require
> C++.
> The key line of code from the example I gave is:
>
> pCmdTarg->Exec(&CGID_MSHTML,
> IDM_PRINT,
> OLECMDEXECOPT_PROMPTUSER,
> &vTemplatePath,
> NULL);
>
> Basically, what you would do in .NET is cast your IWebBrowser2 object to> an IOleCommandTarget and call the Exec method (as above) passing in
> the
> path to your print template (vTemplatePath in the above example.) The
> vast majority of the Print Template code will be written in
> JavaScript.
>
> Honestly, I think you would be better investing in a report writing tool> (e.g. ActiveReports) The path you are headed down with the WB is not an> easy one.
>
> --
> Colin Neller
> http://www.colinneller.com/blog
>
>
> "Alex Clark" <ho*******@newsgroups.nospam> wrote in message
> news:%2****************@TK2MSFTNGP11.phx.gbl...
>> Hi Colin,
>>
>> These look really useful but the article seems to imply that this is
only
>> possible when using C++. I know it was written a long time ago (before>> .NET) but it doesn't seem as though it could be very VB.NET friendly
>> :-(
>>
>> Thanks,
>> Alex
>>
>>
>>
>> "Colin Neller" <cn*****@gmail.com> wrote in message
>> news:e6**************@tk2msftngp13.phx.gbl...
>>> Alex,
>>>
>>> I suggest you look into Print Templates:
>>>
>>>
http://msdn.microsoft.com/library/de...us/dnie55/html /beyondprintpreview.asp
>>>
>>>
http://msdn.microsoft.com/library/de...us/dnie55/html /printtemplate2.asp?frame=true
>>>
>>> --
>>> Colin Neller
>>> http://www.colinneller.com/blog
>>>
>>>
>>> "Alex Clark" <ho*******@newsgroups.nospam> wrote in message
>>> news:%2****************@tk2msftngp13.phx.gbl...
>>>> Greetings,
>>>>
>>>> (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
>>>>
>>>> I've decided to take advantage of the layout characteristics of
>>>> HTML
>>>> documents to simplify my printing tasks, but of course it's thrown up a
>>>> whole host of new issues...
>>>>
>>>> I'm generating a multi page printable document in HTML from my app,
and
>>>> displaying it in a WebBrowser control. I've looked into using some
CSS
>>>> commands to control pagination, but nothing seems to fit the bill
>>>> so
>>>> far.
>>>>
>>>> I need to include a custom header/footer (imported from another
>>>> HTML
>>>> file) on every page that's printed. I also need to draw a border
>>>> around each page. The closest I can get to the border is putting all>>>> my print-content inside an HTML table, which looks ugly because it
>>>> doesn't close off at the foot of each page - it only draws its
>>>> final
>>>> horizontal line at the very end of the document.
>>>>
>>>> I tried inheriting from WebBrowser and overriding the OnPrint
>>>> event,
>>>> but this never seems to get called? I've found an example on the
MSDN
>>>> site, but it's all in C++ and seems designed around MFC.
>>>>
>>>> How can I hang on to the snazzy built-in formatting features of HTML,>>>> but still have control over the printed output & pagination? Help!
>>>>
>>>> Thanks in advance,
>>>> Alex Clark
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Mar 16 '06 #9
Hi Terry,

After some tinkering I've managed to get it to work with a sample Print
Template! However, I am left with another problem.

If I call .ExecWB of the ActiveX control, it works no problem. However, I
have a requirement to use the managed .NET 2.0 WebBrowser control rather
than the COM control. This is easy enough, as all I then do is the
following:

WebBrowser1.ActiveXInstance.ExecWB(SHDocVw.OLECMDI D.OLECMDID_PRINTPREVIEW,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, "c:\Template.htm", Nothing)

(Note: Option Strict is OFF to permit late binding calls like this).

However, this returns an error message:

"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Why would this work fine using the COM version of the control, but fail when
trying it with the managed version? Any ideas?

Thanks,
Alex Clark

Mar 16 '06 #10
Hi Alex,
Thanks for your feedback! :)
After some tinkering I've managed to get it to work with a sample Print
Template! However, I am left with another problem. We are glad our information is helpful for you.
Why would this work fine using the COM version of the control, but fail whentrying it with the managed version?
After researching, this issue needs trace code further in dinput.dll and
debug internal to find what happens at all. This is beyond Newsgroup
support. So in this scenario, we suggest you contact with our CSS (Customer
Support Service) support team to get more information and support. This may
need you submit a support incident in Microsoft CSS. As a MSDN subscriber,
you have two free support incidents.

By the way, if the problem is confirmed by Microsoft CSS as a product
issue, CSS won't charge money. Every MSDN subscriber has two free support
incidents. You could use one of them to contact Microsoft CSS. So you don't
need to pay money yet. Surely if the issue is a product issue, you still
have two free support incidents.

For your reference, I attached steps to contact Microsoft CSS here: You can
contact Microsoft Customer Support directly to discuss additional support
options you may have available, by contacting us at 1-(800)936-5800 or by
choosing one of the options listed at:
http://support.microsoft.com/d-efaul...Offe-rProPhone

If you have any questions or concerns, please let me know. I am standing by
to help you. Thanks for your understanding!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl> <e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
<e7**************@TK2MSFTNGP12.phx.gbl>
<np**************@TK2MSFTNGXA03.phx.gbl>
<uY**************@TK2MSFTNGP11.phx.gbl>
<Pp**************@TK2MSFTNGXA03.phx.gbl>Subject: Re: WebBrowser Control Printing
Date: Thu, 16 Mar 2006 15:21:36 -0000
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <ue**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host81-152-10-23.range81-152.btcentralplus.com 81.152.10.23Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:322116
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Terry,

After some tinkering I've managed to get it to work with a sample Print
Template! However, I am left with another problem.

If I call .ExecWB of the ActiveX control, it works no problem. However, I
have a requirement to use the managed .NET 2.0 WebBrowser control rather
than the COM control. This is easy enough, as all I then do is the
following:

WebBrowser1.ActiveXInstance.ExecWB(SHDocVw.OLECMD ID.OLECMDID_PRINTPREVIEW,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, "c:\Template.htm", Nothing)

(Note: Option Strict is OFF to permit late binding calls like this).

However, this returns an error message:

"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Why would this work fine using the COM version of the control, but fail whentrying it with the managed version? Any ideas?

Thanks,
Alex Clark


Mar 20 '06 #11
Hi Terry,
http://support.microsoft.com/d-efaul...Offe-rProPhone


This link seems to be broken? :-(

-Alex
Mar 22 '06 #12
Hi Alex,
Please use the following link:
http://support.microsoft.com/

Thanks for your understanding!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
Reply-To: "Alex Clark" <ho*******@newsgroups.nospam>
From: "Alex Clark" <ho*******@newsgroups.nospam>
References: <#5**************@tk2msftngp13.phx.gbl> <e6**************@tk2msftngp13.phx.gbl>
<#8**************@TK2MSFTNGP11.phx.gbl>
<Ok**************@TK2MSFTNGP12.phx.gbl>
<e7**************@TK2MSFTNGP12.phx.gbl>
<np**************@TK2MSFTNGXA03.phx.gbl>
<uY**************@TK2MSFTNGP11.phx.gbl>
<Pp**************@TK2MSFTNGXA03.phx.gbl>
<ue**************@TK2MSFTNGP09.phx.gbl>
<6Q**************@TK2MSFTNGXA03.phx.gbl>Subject: Re: WebBrowser Control Printing
Date: Wed, 22 Mar 2006 12:44:15 -0000
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <#B**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host86-134-249-208.range86-134.btcentralplus.com 86.134.249.208Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:322967
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi Terry,
http://support.microsoft.com/d-efaul...Offe-rProPhone


This link seems to be broken? :-(

-Alex


Mar 23 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
5
by: John Bowman | last post by:
Hi, I've been reading through the threads on using the WebBrowser control in C# app's and how to print it's contents. I've got that much working. However, the big problem is I can't figure out...
2
by: Chris Bingham | last post by:
Hi everyone, Does anyone know how to fix the paper orientation depending on the paper size used when printing with the WebBrowser control please? What I've got is a HTML file, containing 1 big...
1
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
1
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
2
by: johnb41 | last post by:
I'm using .NET 2.0. My form is displaying the webbrowser control, which is displaying some HTML text. When printing with webbrowser.print(), my printout includes the header and footer. How...
11
by: Webbert | last post by:
I am trying to display XML in a WebBrowser Control. I receive a data feed of XML and am trying to inject it into the control. I have not been successful in doing so. The only solution I have...
1
by: Meels Lilbok | last post by:
Hi Im usin a WebBrowser control on my C#/WinForm application. There are 2 options for user, 1) Print output to PDFPrinter or 2) Print output to default system printer. In code i change...
1
by: Tim Sprout | last post by:
I want to call Page Setup to set default printer and page size and orientation before batch printing pdf's silently from WebBrowser controls. I can print silently using DDE (the NDde library) or...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.