[Solved] Paste uses Openoffice clipboard, not Windows clipboard

Discuss the word processor
Locked
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

[Solved] Paste uses Openoffice clipboard, not Windows clipboard

Post by BasePlayer »

I can copy and paste without any problems within a document (from one part to another), but if I copy text from another program to the clipboard (e.g. from Translate), and then paste, Writer pastes only what was already on the clipboard within the document.

This has only just started happening with Writer. Initially I thought it might be an OS problem, but if I use Notepad, for example, everything functions normally.

Having seen a similar problem on the forum, I've tried doing a Profile reset, but this makes no difference.

Any suggestions appreciated.
 Edit: Changed subject, was Paste from clipboard not working 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Wed Jun 25, 2025 5:55 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved]
Keith
(Open Office Ver 4.1.11 on Windows 10)
User avatar
MrProgrammer
Moderator
Posts: 5455
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Paste from clipboard not working

Post by MrProgrammer »

BasePlayer wrote:Having seen a similar problem on the forum …
Why do you not help by providing a link to the topic you have seen? If you don't know how to create link in a post, you could at least give us the date and the title.
BasePlayer wrote:if I copy text from another program to the clipboard (e.g. from Translate), and then paste, Writer pastes only what was already on the clipboard within the document.
Issue: OO does not paste the text contents of the Windows clipboard - instead, it pastes the previous text copied in OO
Topic from 2010: OOo doesn't paste last clipboard but previous

Issue 113171 from 2010 is still open. You can read the discussion. The issue title mentions Windows, but I know it happens on MacOS too, even when no "clipboard manager" is installed. Perhaps LibreOffice has corrected the problem. I do not use LibreOffice. You could search their issues list.
BasePlayer wrote:This has only just started happening with Writer. Initially Initially I thought it might be an OS problem …
Clipboard managers are known to cause trouble for OpenOffice. If you installed one recently, try removing it.
https://duckduckgo.com/?q="clipboard+ma ... osx&ia=web
BasePlayer wrote:Open Office Ver 4.1.1 on Windows 8.1 and Mac OSX 10.9
All of that is rather old. OpenOffice 4.1.1 is 2014. The current version is 4.1.11 so you are missing ten updates and might experience problems which have been fixed. Windows 8.1 is 2013 and mainstream support ended three years ago. MacOS 10.9 is 2013 and not been supported for five years. Is your signature still current? If it is wrong you risk receiving inappropriate advice. Fix your forum signature in User Control Panel → Profile → Edit Signature. There are both risks and benefits to updating software. The choice is yours, of course. Using unsupported operating systems can expose you to computer viruses.
 Edit: You can review the LibreOffice discussion about the same difficulty:
EDITING: copy-paste from non-LibO-text-source pastes previous clipboard contents
I would think if the problem were really solved the status would be VERIFIED FIXED. But it's RESOLVED WORKSFORME! Just because it works for one person doesn't mean it works for everyone. Who knows? I'm not a developer. Seems promising though. 
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).
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from clipboard not working

Post by BasePlayer »

Why do you not help by providing a link to the topic you have seen? If you don't know how to create link in a post, you could at least give us the date and the title.
Sorry - I didn't think of doing that. The poster had many issues, and was very rude. The only suggestion regarding the copy/paste problem was the one I tried.
OO does not paste the text contents of the Windows clipboard - instead, it pastes the previous text copied in OO
Yes, that's what's happening now. But I have been pasting contents from the Windows clipboard (from Google Translate) for years, up until now.

But thank you for sending links to other posts. I'll see if there are any solutions in there that work for me.

BTW - I haven't installed any clipboard manager.
Keith
(Open Office Ver 4.1.11 on Windows 10)
John_Ha
Volunteer
Posts: 9605
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Paste from clipboard not working

Post by John_Ha »

Well known AOO "bug" which seems to affect very few users. I had it on my desktop but not on my laptop which was virtually identical so I think there it was probably some sort of hardware induced race hazard. It was very frequent many years ago when I posted in the forum and raised a bug report for it. Over the years it gradually went away and I haven't experienced it for many years.

If updating to the latest version doesn't fix it try to LibreOffice.

The copy/paste code in AOO is apparently very flaky.
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.
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

Windows 8.1 Extended Support doesn't end till January 10, 2023

I don't know how you live without a clipboard manager - I use Ditto (free).
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

I found and installed version 4.1.11, and thought "that'll fix it!"
Unfortunately not!
Next step LibreOffice, I guess.

To me it just seems totally weird that this should start happening when I've been running OpenOffice for years with no problems, and
I rarely make any changes to my computer setup.

Thanks for your input.
Keith
(Open Office Ver 4.1.11 on Windows 10)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Just tried resetting my profile again (as the new release is clearly using my profile from the previous release).
However, when I went through the same procedure as before (using %appdata%), on reopening the program, I was taken to the installation screen.

It feels like OpenOffice has its own clipboard, and no longer knows where to find the Windows clipboard so that it can overwrite it.
Keith
(Open Office Ver 4.1.11 on Windows 10)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Sorry guys, I hadn't noticed that my signature was way out of date. I'm using Windows 10.

II wonder what your clipboard manager gives you that Windows doesn't. I've just had a look at the extended version, and while it lists all my recent "copies", Writer stolidly refuses to paste any of them! It will only paste the text copied in Writer itself.
Keith
(Open Office Ver 4.1.11 on Windows 10)
User avatar
Zizi64
Volunteer
Posts: 11509
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Paste from external program to Writer not working

Post by Zizi64 »

I'm using Windows 10.
Win 10 has its own clipboard manager, and (maybe) the AOO is not compatible with it.
Windows 10 Clipboard History:
https://support.microsoft.com/en-us/win ... 46ddf338c6
Try the LibreOffice. It has a higher compatibility level with the newer features of the operating systems.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Thanks, I'm going to try LibreOffice

Feels like goodbye to an old friend!

In the meantime using a workaround - external copy from wherever and paste to Notepad, save file as "paste.txt" and then insert file into Writer.
Keith
(Open Office Ver 4.1.11 on Windows 10)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

Have you tried Paste Special instead of Paste?
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Yes - it made no difference.
Keith
(Open Office Ver 4.1.11 on Windows 10)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Just tried it again! I notice that the dialogue box says "Source: OpenOffice 4.1.11 Text Document" whereas I might have expected it to say "Clipboard"
There's no obvious way to change this. Could this be the problem?
Keith
(Open Office Ver 4.1.11 on Windows 10)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

If I paste from Google translate I get a choice of Html format and unformatted text from Paste Special into Writer.

the attached document has a textbox - does it work pasting into that?

There's also a button which runs the below macro which pastes but opens and closes the clipboard first... just a wild longshot... to see if that makes any difference. (Edit: macro will only work on Windows)

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
Attachments
test clipboard.odt
(11.54 KiB) Downloaded 323 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Pressing the button did nothing.

Paste (Ctrl-v) just pasted the outgoing text to 'Translate' from Writer rather than the incoming translation.

Many thanks for your efforts, JeJe
Keith
(Open Office Ver 4.1.11 on Windows 10)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

Are you sure you're copying text the translation from Google translate properly?

(Edit: sorry, probably a stupid question)

The button should paste so long as the cursor is in that document's text - i don't understand why that wouldn't work.

At least you have the Notepad (which I use myself a lot) workaround.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

You could try dragging and dropping into Writer - works for me.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

Yes, that works. Thanks.
Keith
(Open Office Ver 4.1.11 on Windows 10)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: Paste from external program to Writer not working

Post by JeJe »

You perhaps don't have macros enabled for that document - I'm not really expecting it to make any difference.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

You were right of course. I tried it again with macro security on low.

But it still made no difference!
Keith
(Open Office Ver 4.1.11 on Windows 10)
User avatar
Zizi64
Volunteer
Posts: 11509
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Paste from external program to Writer not working

Post by Zizi64 »

I tried it again with macro security on low.
You must reopen the document, after you adjust the settings.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: Paste from external program to Writer not working

Post by BasePlayer »

That was it! Success!

So, you must be on to something there. Should I embed your macro in each of my documents?
Keith
(Open Office Ver 4.1.11 on Windows 10)
JeJe
Volunteer
Posts: 3134
Joined: Wed Mar 09, 2016 2:40 pm

Re: [Solved] Paste from external program to Writer not worki

Post by JeJe »

That's a surprise. You can copy the macro from the post above and paste it at the top of a module in your MyMacros Standard Library. Instructions here:

viewtopic.php?t=5519

Then set a shortcut or toolbar item to call it.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
BasePlayer
Posts: 105
Joined: Mon Dec 03, 2012 1:23 am

Re: [Solved] Paste from external program to Writer not worki

Post by BasePlayer »

Brilliant! Many thanks.
Keith
(Open Office Ver 4.1.11 on Windows 10)
John_Ha
Volunteer
Posts: 9605
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Paste from external program to Writer not worki

Post by John_Ha »

See Comment 39 in Issue 113171 - OO does not paste the text contents of the Windows clipboard - instead, it pastes the previous text copied in OO where I have pointed to JeJe's macro code as a possible simple "brute force" fix for this problem.
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.
Locked