Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
wingswin1 wingswin1 is offline
external usenet poster
 
Posts: 3
Default Word 2007 Paste Options not honored

Whenever I copy text from one document and paste it into another, the text is
pasted in with the formatting of the destination document. I have tried
setting all of the "Pasting ..." options for Word to "Keep Source Formatting"
(which is the default for 3 of the 4 options), but it still keeps getting
pasted in using the destination styles. I can change it using the smart tag
after I paste it, and it seems to stick then until I close Word. Once I open
it again, I'm back to destination styles when I paste text. Anyone know how
to make the paste command honor the pasting options?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2007 Paste Options not honored

Hi ?B?d2luZ3N3aW4x?=,

Whenever I copy text from one document and paste it into another, the text is
pasted in with the formatting of the destination document. I have tried
setting all of the "Pasting ..." options for Word to "Keep Source Formatting"
(which is the default for 3 of the 4 options), but it still keeps getting
pasted in using the destination styles. I can change it using the smart tag
after I paste it, and it seems to stick then until I close Word. Once I open
it again, I'm back to destination styles when I paste text. Anyone know how
to make the paste command honor the pasting options?

Could you please be more precise about what kind of formatting you're copying
and pasting? Is this formatting that's been applied to the text directly? Is it
a style that's present in both documents? Something else?

On my installation, if I've set the options to "Keep Source Formatting" it does
keep the formatting. But any style definitions that conflict with existing
styles in the target document are dropped (only the formatting is brought
across).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Buckland ?:-\) Bob   Buckland ?:-\) is offline
external usenet poster
 
Posts: 2,073
Default Word 2007 Paste Options not honored

Hi Cindy,

See what happens in your installation with this scenario:

With the Word 2007 option for 'Pasting Between Documents' set to
"Keep source formatting (Default)",
start two new documents and in each document type
=rand(9,1)

To one document apply a style set or a theme, then copy (right click/copy) one paragraph from that document into the other document.

The 'paste icon' in the receiving document defaults to either
'Use destination theme' or 'Match Destination Formatting'
(depending on how you modified the text in the 'copy from' document) rather than defaulting to the 'Keep Source Formatting' choice.

I suspect that this setting may not be 'theme aware', but also that the perceived definition of 'formatting' that many people would
make would not have a distinction between different types of formatting or how it's applied, as the option setting doesn't allow
that specificity.

===============
"Cindy M." wrote in message news:VA.000008f4.00b12974@speedy...
Hi ?B?d2luZ3N3aW4x?=,
Could you please be more precise about what kind of formatting you're copying
and pasting? Is this formatting that's been applied to the text directly? Is it
a style that's present in both documents? Something else?

On my installation, if I've set the options to "Keep Source Formatting" it does
keep the formatting. But any style definitions that conflict with existing
styles in the target document are dropped (only the formatting is brought
across).

Cindy Meister
--

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2007 Paste Options not honored

Hi Bob,

With the Word 2007 option for 'Pasting Between Documents' set to
"Keep source formatting (Default)",
start two new documents and in each document type
=rand(9,1)

To one document apply a style set or a theme, then copy (right click/copy) one paragraph from that document into the other document.

The 'paste icon' in the receiving document defaults to either
'Use destination theme' or 'Match Destination Formatting'
(depending on how you modified the text in the 'copy from' document) rather than defaulting to the 'Keep Source Formatting' choice.

I suspect that this setting may not be 'theme aware', but also that the perceived definition of 'formatting' that many people would
make would not have a distinction between different types of formatting or how it's applied, as the option setting doesn't allow
that specificity.

Maybe I'm missing something, but I see what I'd expect to see...

2 documents, one left as "default", in the other I select the "Fancy" style set. I select a paragraph and apply Heading 1 style.
Select that, plus a couple more paragraphs and copy. Move to the other document and paste. All the formatting comes across, but as
direct formatting.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
wingswin1 wingswin1 is offline
external usenet poster
 
Posts: 3
Default Word 2007 Paste Options not honored

Hi Cindy,

After doing some digging, my problem is actually occuring when using the
API. I'm creating a copy of the current document (long story as to why) and
then manipulating it. In versions prior to 2007, the Range.Paste() or
Selection.Paste() would insert the text and formatting as it appeared in the
original source document. However, with 2007 the Paste() function appears to
insert the text but takes the formatting of the current theme (at least
that's what I think it's doing). I found that I have to use the
PasteAndFormat() function to tell it to keep the original formatting. Below
is a simple code example from a C# addin that I'm using to test solutions to
the problem. Switching the last two lines gives me different results. I
should also add that I'm using a formatted Word 2003 document as the source,
but I'm hoping that doesn't matter. I've tried saving it as a 2007 docx and
then executing the code below but get the same results.

Word.Document srcDoc = wordApp.ActiveDocument;
Word.Document destDoc = wordApp.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);
srcDoc.ActiveWindow.Selection.WholeStory();
srcDoc.ActiveWindow.Selection.Copy();
//destDoc.ActiveWindow.Selection.Paste();
destDoc.ActiveWindow.Selection.PasteAndFormat(Micr osoft.Office.Interop.Word.WdRecoveryType.wdFormatO riginalFormatting);




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2007 Paste Options not honored

Hi ?B?d2luZ3N3aW4x?=,

After doing some digging, my problem is actually occuring when using the
API.

Ah, yes, mentioning that would make a difference. There was already a
shift in the default behavior between UI and object model going into Word
2002, when "Smart pasting" was introduced. They will indeed not coincide.

However, with 2007 the Paste() function appears to
insert the text but takes the formatting of the current theme (at least
that's what I think it's doing). I found that I have to use the
PasteAndFormat() function to tell it to keep the original formatting.

So you're OK now?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

  #7   Report Post  
Posted to microsoft.public.word.docmanagement
wingswin1 wingswin1 is offline
external usenet poster
 
Posts: 3
Default Word 2007 Paste Options not honored

This seems like a bug rather than intended behavior to me, but from your
response I'm assuming this is the way that MS wanted it to work? Is there
any way to make the Paste function operate like it has for every prior
version going back to Word 95? If not, that is really unfortunate as it
makes creating backwards-compatible solutions a real challenge. I hate the
idea of going back in and reengineering all my current solutions with "if
Word2007 then ... else ...".

Do you know if any of the API behavior is documented somewhere? I've
looked in the usual places, msdn and such, but none of them mention any
change in the way that the Paste function behaves. I would like to know if
there are any other "subtle" changes in the API from 2003 to 2007 that might
affect me like this one.


  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Word 2007 Paste Options not honored

Hi ?B?d2luZ3N3aW4x?=,

Is there
any way to make the Paste function operate like it has for every prior
version going back to Word 95?

I don't think so, no.

Do you know if any of the API behavior is documented somewhere?

Only MSFT-internally, I believe. The Office teams have a tendency to not
publically document changes in the object models - I don't know why.

I would like to know if
there are any other "subtle" changes in the API from 2003 to 2007 that might
affect me like this one.

I imagine there will be a number of unexpected changes in 2007, just because so
much has been changed in the interface: RibbonX, new (and in Word only
partially implented) graphics engine, the new XML file formats...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 97 in Windows XP to maintain formatting Charlie''s Word VBA questions Microsoft Word Help 22 May 20th 23 08:51 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
Why can't I get Multiple instances of word? Laverne Microsoft Word Help 14 November 17th 06 01:35 PM
Change paper size; Word changes to invalid margins OhioTech New Users 10 July 6th 06 02:00 PM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM


All times are GMT +1. The time now is 04:22 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"