473,507 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GetData images from OneNote

I have done a screen clipping in oneNote and now want to save to file.

So I copy the image in oneNote, and then using c# try and getData from the
clipboard and store in an image to be able to save to file.

However unlike Word, OneNote does not paste a bitmap compatible image to the
clipboard. It does sat is supports EnhancedMetaFile, DeviceIndependentBitmap,
OneNote internal or HTML.

The first 2 return when used with getdata return null.

Is this a bug in OneNote or my VS code?

oDataObj.GetDataPresent(DataFormats.MetafilePict); returns true

oDataObj.GetData(DataFormats.MetafilePict); returns null

Same for Dib and EnhancedMetafile.

Simon
Nov 16 '05 #1
2 4073
Hi Simon,

I can only recommend you to try:
oDataObj.GetFormats(true);

Read "IDataObject.GetFormats" for more info.

HTH
Marcin
I have done a screen clipping in oneNote and now want to save to file.

So I copy the image in oneNote, and then using c# try and getData from the
clipboard and store in an image to be able to save to file.

However unlike Word, OneNote does not paste a bitmap compatible image to the
clipboard. It does sat is supports EnhancedMetaFile, DeviceIndependentBitmap,
OneNote internal or HTML.

The first 2 return when used with getdata return null.

Is this a bug in OneNote or my VS code?

oDataObj.GetDataPresent(DataFormats.MetafilePict); returns true

oDataObj.GetData(DataFormats.MetafilePict); returns null

Same for Dib and EnhancedMetafile.

Simon

Nov 16 '05 #2
I did that and it returned the 4 formats I mention.

Bizarrely it now seems to work, which is great I now have a systray icon
that on clicking will popup a save dialog, and save the clipboard image to a
file. No having to start word, etc.

Simon

"Marcin Grzębski" wrote:
Hi Simon,

I can only recommend you to try:
oDataObj.GetFormats(true);

Read "IDataObject.GetFormats" for more info.

HTH
Marcin
I have done a screen clipping in oneNote and now want to save to file.

So I copy the image in oneNote, and then using c# try and getData from the
clipboard and store in an image to be able to save to file.

However unlike Word, OneNote does not paste a bitmap compatible image to the
clipboard. It does sat is supports EnhancedMetaFile, DeviceIndependentBitmap,
OneNote internal or HTML.

The first 2 return when used with getdata return null.

Is this a bug in OneNote or my VS code?

oDataObj.GetDataPresent(DataFormats.MetafilePict); returns true

oDataObj.GetData(DataFormats.MetafilePict); returns null

Same for Dib and EnhancedMetafile.

Simon

Nov 16 '05 #3

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

Similar topics

0
885
by: Brian Henry | last post by:
Is there any articles on how to create tabbed MDI type apps in the way Office OneNote does or VS.NET does? or any free controls out there that do similar? thanks!
3
3225
by: nAmYzArC | last post by:
Hello every1, I have a "<DIV" tag with contenteditable turned on. I am using this as an area that users can either paste or drag/drop text into. The text can come from other browser windows and of...
11
7040
by: nAmYzArC | last post by:
Hi all, On our site we have a section that allows users to copy and paste or drag and drop the contents of (pretty much any) webpage into a Div. I need to get access to the clipboard data. To do...
4
5680
by: Piotrek | last post by:
Hi all. I am developing some web application in which I use datasets, which were generated using dataSetDesigner. My dataset has a TableAdapter, which has GetData method. Users of my application...
6
4099
by: Screaming Eagles 101 | last post by:
Hi, I got this warning, but I don't have a clue on how to resolve it the best way, maybe one of you can help. Application is running smoothly, it's only a warning, but I'd like to resolve it. ...
4
7731
by: dwhalen | last post by:
Hi Everyone. I'm new to drag-and-drop, and I'm running into a problem getting some code I found to work in FireFox. I have a third-party Tree control that accepts droppable items that implement...
0
1147
by: =?Utf-8?B?RE1M?= | last post by:
I am trying to email an entire OneNote Work book to an associate. It seems that it will only send one page at a time by email. Is there any way to send by email an entire workbook? Thanks
5
3422
by: nagar | last post by:
I have a .NET 2.0 application that needs to backup and restore the contents of the clipboard. When I back it up, I use this code: DataObject oldClipboard = Clipboard.GetDataObject();...
0
2763
by: =?ISO-8859-1?Q?=22Ro=DFert_G=2E_Schaffrath=22?= | last post by:
Sorry for the cross-posting. I am having a hard time trying to classify exactly what group this question would apply to. I had posted an earlier message to...
0
7223
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,...
0
7114
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...
0
7321
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,...
0
7488
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...
1
5045
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...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
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...
0
1544
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 ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.