#1
|
|||
|
|||
Font issues when copy content from MS Word.
When I copy a text of line without closing paragraph mark from word (2007/2013) to my application using windows clipboard functionality, the font of the text is not retained and it changes to default font set for the application. However, if I copy the same text including the closing paragraph mark and paste into my application it retains all the formatting including font face and size.
Is this behavior known about MS Office Word. Is it a problem with word or windows clipboard? Is there a solution which I can use to resolve the issue? Please suggest. |
#2
|
|||
|
|||
as far as I understand it, the formatting information (for apps that are aware of it) is contained in the paragraph mark
|
#3
|
|||
|
|||
Is there a way I can get or retain formatting without paragraph mark? I could get the input rtf while copying the text from word in my application and found that the font Courier New, 10 with which the text was created was missing in the rtf not having the para mark. please find the rtfs attached below with & without the para mark copied. I understand that without the font details there is nothing we can do but is there an alternative because we cannot force clients to copy content with para mark. They should be able to copy any piece of text from the word document.
Rtf of the text copied with paragraph mark: {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff3150 7\deff0\stshfdbch31506\stshfloch31506\stshfhich315 06\stshfbi31507\deflang1033\deflangfe1033\themelan g1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} {\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} {\rtlch\fcs1 \af2 \ltrch\fcs0 \cf18\insrsid3284070 "Segoe UI Bold (TrueType)"="" \par } Rtf of the text copied without paragraph mark: {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff3150 7\deff0\stshfdbch31506\stshfloch31506\stshfhich315 06\stshfbi31507\deflang1033\deflangfe1033\themelan g1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\rtlch\fcs1 \af31507 \ltrch\fcs0 \cf17\insrsid3284070 "Segoe UI Italic (TrueType)"=""} I have pasted the rtfs in fragments where font details and text copied is captured above. Please find the complete rtfs attached for reference and give your inputs on if something can be done to retain the formatting? |
#4
|
||||
|
||||
If you want to retain character formatting, you can do so using a character style. Such a style can be applied to a text range smaller than a paragraph.
By the way, I noticed that you had posted a similar question in the Microsoft Community. Cross-posting should be used carefully. It is a good idea to let posters know that you have posted elsewhere too.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
Tags |
clipboard, font issues, word 2013 |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy Protect a word file's content | Tim Tayler | Word | 4 | 03-12-2016 04:04 PM |
Page Up & Copy/Paste Issues | weamish | Word | 10 | 02-01-2014 08:25 PM |
Word 2010 table of content - font | xyz123 | Word | 3 | 09-26-2013 02:25 PM |
Font Issues - Hypatia | rogern | Word | 5 | 04-07-2011 04:30 PM |
Need help copy and pasting from internet to word, font change sizes. | pearce88 | Word | 3 | 11-19-2009 11:27 PM |