473,800 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSharp Clipboard Ms-Word Image Question

P N
Hi all,
I have question about copying picture from MS-Word into the Clipboard and
then copy from the Clipboard into the bitmap variable within C#. The
original image size is 2288 x 1712. If I were to copy the image from Ms-
Word and "Paste as New Image" in Photo Editor, I got the resolution 2288 x
1712. If I used the code below, I got the image size of 720 x 538 stored
in PreviewBitmap[Loop] variable. Why is the size of the picture truncated?
How do I get the size of 2288 x 1712 stored in PreviewBitmap[Loop]?

---- Begin Code ----
foreach(InlineS hape inshImage in wordApp.ActiveD ocument.InlineS hapes)
{
// Copy the image as picture into the clipboard
inshImage.Range .CopyAsPicture( );

// Then get the image from the clipboard.
IDataObject iData = Clipboard.GetDa taObject();

// Make sure that the information that we grab from the clipboard is
// a bitmap (or some kind of image format) and stored it into the
array.
if (iData.GetDataP resent(DataForm ats.Bitmap))
PreviewBitmap[Loop] = (Bitmap)iData.G etData
(DataFormats.Bi tmap);

Loop++;
}
Nov 17 '05 #1
0 3255

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

Similar topics

1
2560
by: tabonni | last post by:
Hi all I want to create an ASP page, which can copy the real PDF files into the clipboard and then the user can paste it in Outlook message as attachments(it's like inserting attachments) My idea is: When user checked the checkboxes for the requested PDF files from ASP page and press the "Add To Clipboard" button, all requested PDF files will be copied into clipboard. Then, the user open MS outlook message and right click -> Paste all...
0
1470
by: semhelp | last post by:
I am using VB.net to put a bitmap on the clipboard. MS paint and MS wordpad recognize the bitmap on the clipboard, but openoffice Writer does not. If I put the bitmap on the clipboard from MS paint or MS wordpad, then the bitmap is recognized be openoffice writer. Any Ideas???
5
4345
by: tabonni | last post by:
Hello All I am creating an ASP page. There are a list of filename and checkbox next to it. When user checked all the documents they want and click ADD TO CLIPBOARD button. All filepaths will be copied into clipboard and then they can right-click -> paste into MS Outlook as attachments. How can I use clipboardData.setData function to do that? I saw a lot of examples they are just copy and paste text.
16
12491
by: DataBard007 | last post by:
I have an Access97 application whose form contains many text boxes. What do I have to do in order to copy the contents of one of these text boxes to the clipboard? I want to do this so I can then paste from the clipboard to Word, Notepad, etc. I know about the SetClipboardData function, but I really can't figure out how it works. It's supposed to be used in conjunction with the OpenClipboard function, I think. If anybody knows,...
5
1625
by: MLH | last post by:
I had a form (Form12) with a code error in it. I knew it was there. I even planned on fixing it (someday). I needed a comprehensive test of all my code so I clicked Debug, Compile All Modules. My standard modules were all good but the compilation test halted in a Class Module on Form12 due to the error. OK, I thought, don't really wanna screw around with this right now, so I'll take it out-a-the equation. I chose it on the database window...
4
2659
by: light_wt | last post by:
Hi I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET Is there good free resource in the web? If not, I have pulled a few books in the following. I am wondering which book has the concise step-by-step with lots of pictures helping to navigate on how to do something simple, i.e. concept of tabbed dialog box, web form, asp.net,...
4
10384
by: ACF | last post by:
Hello, I'm programming an application in MS Access 2003 / 2007 and would like to know how I can copy highlighted text to the windows clipboard? I am now using a statement in combination with module "Call ClipBoard_SetData(Memo)" but this copies the whole 'memo' field. I want to highlight text in the memo field and copy only that text to the clipboard. What I really want is the VBA code for window's to copy selected text to the...
0
941
by: shuu | last post by:
Hi I have a application that captures the screen och sends the images to a server. I want to save the destination URL's (like: http://domain.com/dump/img.jpg) to the clipboard, but this only works when my application is minimized in the system tray. I know what the problem is but cant find any solution for it. My Code: Clipboard.SetText(urlFormat, TextDataFormat.Text);
23
6309
by: Over | last post by:
Hi it's possible with language C, (Mingw or Djgpp) copying the clipboard of WinXp into file.txt? which function must be use. Thanks
3
6485
by: rebel4ever | last post by:
Ok so here's the problem. I have Table A with some fields, dont matter what fields and Table B with an ID field and a Code field. What i want to do is to use VBA to automaticaly export the XML code of table A into the Code field of table B without using external files. I couldn't find a direct way of doing this so if there isn't, maby it's possible to export the code to the clipboard and from there import it to the table. Any ideas? L.E. :...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.