Avatar of LadgateLane
LadgateLaneFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

On a web browser control, how do I code a Select All followed by a Copy for HTML or XML documents.

Hello Experts

I'm creating a Windows Application using VS2005, written in C#. This application contains a Web Browser control.  I'm navigating to an XML document that uses a stylesheet to display this document correctly.  When displayed correctly, it will display an image in one of the table cells that is present in the final output.

Using the mouse, I can right-click on the web browser control and choose Select All, and then right-click and choose copy.  This will successfully copy the contents to the ClipBoard.  The content can then be pasted into a Word document keeping the same formatting that was displayed in the Web Browser control.

I want to disable the right-right-click menu due to some of the other options on there.  I was wanting to set up a button that when pressed will replicate the Select All and Copy activities.

I've tried various combinations of the ClipBoard.Set... commands and when I paste into Word I either get the plaintext HTML/XML code or a message is displayed that says "Item not Collected: Format not supported by Office Clipboard".

Can anyone help me to achieve this functionality using C#.
C#

Avatar of undefined
Last Comment
LadgateLane
ASKER CERTIFIED SOLUTION
Avatar of joechina
joechina

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of LadgateLane
LadgateLane
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

A fast response with the required detail.  Thanks for the info.

Obviously I was focused too much on using the Clipboard control.  Must remove the blinkers!!
C#
C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

98K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo