[Issue] Clearing the Clipboard

Discuss the word processor
Locked
kieranoh
Posts: 39
Joined: Wed Sep 04, 2013 4:41 pm

[Issue] Clearing the Clipboard

Post by kieranoh »

Hello,

I am hoping someone can help me with what must be a simple issue (famous last words ?).

Often, I need to copy from a screen view, into a Writer document. I access the screen and select the data I require and copy (ctrl C). I then return to my open Writer document and paste (ctrl V). Most tines it works, but sometimes, it has a previous copy still on the clipboard (i.e. something I copied an hour ago!) and I cannot get my new data into the document.

If I do a paste special, it shows the source as being the old document and no matter what I do, I cannot get in my new copy. Is there some way to clear the clipboard ? Or can someone suggest a way around this problem.

Thanks in advance.

Kieran
Last edited by MrProgrammer on Fri Sep 22, 2023 5:05 pm, edited 1 time in total.
Reason: Mark topic as Issue
openoffice 4.0 on windows 10
User avatar
Hagar Delest
Moderator
Posts: 33709
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clearing the Clipboard

Post by Hagar Delest »

Yes, there are several reports about such issue.
In the document you want to paste in, copy and paste something from this very document. That should clear the clipboard.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the edit button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
kieranoh
Posts: 39
Joined: Wed Sep 04, 2013 4:41 pm

Re: Clearing the Clipboard

Post by kieranoh »

Thanks Hagar. I just went back into the doc and as always in these situations, I couldn't recreate the problem.

I will test your suggestion when it next happens and will revert.
openoffice 4.0 on windows 10
User avatar
Hagar Delest
Moderator
Posts: 33709
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clearing the Clipboard

Post by Hagar Delest »

I'm not that surprised. I've experienced that also but only once. It may be a corner case with other applications or services running on the machine.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
lint1001
Posts: 3
Joined: Sat Feb 06, 2016 9:59 pm

Re: Clearing the Clipboard

Post by lint1001 »

i am having this same problem others have listed in this thread and I have found none of the listed solutions to work. This is a frequent occurance. Very frustrating! I cannot continue to use my many years loved Open Office unless I can find a permanent easy solution. :?
I have a new lenova laptop running windows 11 and am trying to copy from mozilla firefox to Open Office writer. Can someone help?? Thank you!
Open Office 4.1.2 on windows 11
User avatar
Hagar Delest
Moderator
Posts: 33709
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clearing the Clipboard

Post by Hagar Delest »

This topic is 9 years old and it has been a long time since we didn't see this problem.
You may try LibreOffice (at least a portable version just to try). It has less of these old bugs.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Clearing the Clipboard

Post by John_Ha »

I reported it as a bug many years ago (2010) when I was constantly getting it. Despite still having the same PC it gradually disappeared and I have not seen it for years.

It is something strange affecting a tiny, tiny minority of users. Friends with virtually identical installations never saw it yet I was constantly getting it.

See "OO does not paste the text contents of the Windows clipboard - instead, it pastes the previous text copied in OO" at http://www.openoffice.org/issues/show_bug.cgi?id=113171
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
MrProgrammer
Moderator
Posts: 5479
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Clearing the Clipboard

Post by MrProgrammer »

lint1001 wrote: Mon Jan 09, 2023 11:08 pm This is a frequent occurance. … trying to copy from mozilla firefox to Open Office writer. Can someone help??
If you haven't installed Java read Troubleshooting Open/LibreOffice and Java. I cannot help you with Java installation.

After you have installed Java, Tools → Macros → Organize Macros → OpenOffice Basic
→ Macros From → My Macros → Standard
→ select or create a module in standard → Edit → copy/paste/save the macro below

Sub FlushClipboard
CreateUnoService("com.sun.star.datatransfer.clipboard.SystemClipboard").flushClipboard()
End Sub

The problem happens infrequently for me, so I've only had a chance to test the macro twice, but it cleared the clipboard then.

To run the macro use Tools → Macros → Run Macro or read
[Tutorial] Binding a macro: Shortcut key, menu or toolbar

If you've installed any "clipboard manager" tools on your operating system, that may be making the problem worse. It might be worth uninstalling them. I do not use Windoze and can't help with any operating system diagnosis or procedures.

Getting Started with Macros, Macro Organization, Page 14


lint1001 should fix their forum signature or they may receive inappropriate advice since it claims they use Windows 7. My guess is that OpenOffice 4.1.2 is also wrong.
Bogus signature.png
Bogus signature.png (57.21 KiB) Viewed 3581 times
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Hagar Delest
Moderator
Posts: 33709
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Clearing the Clipboard

Post by Hagar Delest »

Note that I did experience that sometimes in AOO but not once in the 2 years I think that I use LO. Never had any clipboard manager.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
JeJe
Volunteer
Posts: 3136
Joined: Wed Mar 09, 2016 2:40 pm

Re: Clearing the Clipboard

Post by JeJe »

If you haven't already, you could try the macro that worked for someone's Windows clipboard problem here.

https://forum.openoffice.org/en/forum/v ... 93#p522162

It does a paste but opens and closes the clipboard when it does so.

Code: Select all

    Private Declare Function CloseClipboard Lib "user32" () As Long
    Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long

sub Openandcloseclipboardthenpaste
dim a as variant
        OpenClipboard a
        CloseClipboard
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
end sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Locked