Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Importing Word Objects, without retaining Object status

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Parent - 09 Jul 2007 15:10 GMT
I'm creating a Word document from an Excel document, and depending on various
selections made in the Excel document, I include particular segments of text.

I have created the individual segments in Word, and copied/pasted them into
my Excel document as Word Objects.  This works great, because the segments
keep all the Word formatting, and I can copy/paste specific Word Objects into
a new Word document.  The problem is that I'd prefer not to have each segment
as a separate Word Object within the new Word document.  I can't find a paste
special or other method to return the Word Objects into "native" (my
terminology) Word.  Any ideas?
Russ - 10 Jul 2007 05:56 GMT
If these objects are fields, you can change them into plain text with
myobject.unlink.

> I'm creating a Word document from an Excel document, and depending on various
> selections made in the Excel document, I include particular segments of text.
[quoted text clipped - 6 lines]
> special or other method to return the Word Objects into "native" (my
> terminology) Word.  Any ideas?

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Mark Parent - 10 Jul 2007 15:38 GMT
In case anyone else finds this post, and wonders how to handle it, I've found
one method that does the trick.   After copying and pasting the word segment
into a new Word document, I open the object in a separate sessions, select
all the text, copy it to the clipboard then close the edit session.  Back in
the new WORD document, I delete object, and paste in the text from the
clipboard.

Here is the code that is working for me just fine.
Thanks to Russ for his suggestion.

ThisWorkbook.Sheets("Texts").OLEObjects("Segment 1").Copy
appWD.Selection.Paste

appWD.Selection.ShapeRange(1).OLEFormat.DoVerb _  
                                                       
VerbIndex:=wdOLEVerbPrimary
appWD.Selection.WholeStory
appWD.Selection.Copy
appWD.ActiveWindow.Close

appWD.Selection.Delete
appWD.Selection.PasteAndFormat (wdPasteDefault)

> If these objects are fields, you can change them into plain text with
> myobject.unlink.
[quoted text clipped - 9 lines]
> > special or other method to return the Word Objects into "native" (my
> > terminology) Word.  Any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.