copy-paste

VBA Filter Table and Copy Subset of Resulting Columns to Clipboard

元气小坏坏 提交于 2019-12-06 05:57:05
I am trying to automatically copy a subset of rows and columns from a source table into the clipboard for use in other applications. I am creating the filter on the header of the table and filtering the rows correctly but do not know how to then select the subset of columns in the order I want. The source table is Columns A - L and I want to copy out Columns C, I, H and F in that order to the clipboard after applying the filter. Some code (minus the copy part) is included below. Sub exportExample() Dim header As Range Dim srcCol As Range Set header = [A5:L5] header.AutoFilter header.AutoFilter

how to get animated gif image from browser clipboard api?

旧时模样 提交于 2019-12-06 02:49:26
问题 I am testing the following code, and when I copy an animated gif and paste it to web page, I see image/png in the console - instead of image/gif as expected. Why? document.onpaste = function(event) { console.log(event.clipboardData.items[1]['type']); // 'image/png' }; How can I match a gif image? You can test it at this jsfiddle with this gif image for example. 回答1: The CF_GIF clipboard format is very seldomly used. Most app copy images to the clipboard only as CF_BITMAP, CF_ENHMETAFILE, or

Copy shape in Word 2010 without .Select?

孤街醉人 提交于 2019-12-05 20:34:04
Is it possible to copy a shape in Word 2010 without resorting to .Select ? According to Dev Center the Anchor property returns the shape's anchoring range. Could that be a way forward? However, the code below returns an error. Sub createShape() Set myShape = ActiveDocument.Shapes.AddShape(msoShapeRectangle, 1, 1, 1, 1) myShape.Anchor.Copy End Sub While it does not seem to be possible to copy a shape without selecting it, it is possible to duplicate a shape without selecting it (which was my reason for wanting to copy it in the first place). The code below gives me what I was looking for: Sub

Function Undefined error in JavaFX application

那年仲夏 提交于 2019-12-05 20:07:19
The requirement was to embed a JSON editor in a javafx application. I tried embedding the json editor(powered by Ace) https://github.com/josdejong/jsoneditor into my javafx application with the help of webview. Everything is working except copy(CTRL+C) and paste(CTRL+V). After a research, I came to know that javafx webkit is of safari . But I tried the same editor in web browsers like firefox, chrome and all. Even in latest version of safari it is working well, but I failed to get it working in javafx webview. Currently I am using the latest JDK(8), so having the latest javafx also. Is there

How to modify pasted data ? Jquery

会有一股神秘感。 提交于 2019-12-05 19:24:39
I followed this question JavaScript get clipboard data on paste event (Cross browser) to get the pasted data from the clipboard, but I used jquery instead. Now that I got the data, I removed all html tag. But I don't know how to paste it. element is a contenteditable div element.on('paste', function (e) { var clipboardData, pastedData; e.preventDefault(); // Get pasted data via clipboard API clipboardData = e.clipboardData || window.clipboardData || e.originalEvent.clipboardData; pastedData = clipboardData.getData('Text').replace(/<[^>]*>/g, ""); // How to paste pasteddata now? console.log

How to save off the pasteboard contents first and restore them afterward?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 18:09:53
问题 I have a faceless Mac OS X app which needs to copy selection from other apps. I achieve this by simulating CMD+C keystrokes. It works perfectly. But there is a, I think it's critical, side effect. It'll override users' pasteboard without their permission. So I was thinking before I copying selection I should save pasteboard content and then restore it. Can someone give me some hint, maybe sample code? 回答1: Here's a category on NSPasteboard that I wrote to do this. It seems to work pretty well

Turn Off Whole Line Copy in Visual Studio

核能气质少年 提交于 2019-12-05 13:56:52
问题 There is a setting in Visual Studio 2010 to turn off copy and cut commands when the cursor is on a blank line and there is no selection. However, when the cursor is not on a blank line and you press ctrl+C, it always copies the entire line to the clipboard. I find this very irritating because I always highlight something first, copy it, then place the cursor where I want to paste it and press ctrl+V. However, sometimes I miss the v and hit the c , which replaces the text on the clipboard with

Is there a diff tool that allows copy-paste

混江龙づ霸主 提交于 2019-12-05 09:55:15
问题 Is there a diff tool that allows you to paste two segments of text and get a diff? I can't use an online tool because I'm dealing with proprietary data, and I haven't found a tool that provides that feature. 回答1: Try WinMerge. It'll do that. Steps: Download and install winmerge Open WinMerge & Create new <CTRL+N> Paste into left & right, then refresh <F5> 回答2: In case anyone comes here looking for a tool for Macs that can do this, it seems that there are two tools that can do just this.

How to stop Emacs from “contaminating” the clipboard?

让人想犯罪 __ 提交于 2019-12-05 05:56:29
Emacs always copies killed/deleted content to the clipboard. I often need to copy and paste content into Emacs but when I delete existing content from Emacs before pasting, the content I would like to paste is lost. The only solution I found is to use (setq save-interprogram-paste-before-kill t) in order to make sure content copied outside of Emacs stays available in the kill-ring, and people with similar problems seem to be satisfied with this solution. What bothers me about it is that I have to type C-y followed by one or more repetitions of M-y to get to the content I want to paste. So my

Paste Special in C# vsto Excel

做~自己de王妃 提交于 2019-12-05 02:10:29
问题 I am working on the C# vsto Excel application. Whenever user pastes something in the excel template from another excel sheet,it also pastes Cell format along with the cell data in the excel template. I want to avoid this. So i googled & i came across term paste special. Paste special will only paste the contents and will no alter the format of the current sheet. I want to introduce paste special option in my vsto application. I have code here, Application.OnKey("^v", "PasteSpecV"); but its