Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Paste Special...
Topic Summary:
Created On: 31-Jul-2006 20:48
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 31-Jul-2006 20:48
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

I'm trying to get stuff from Word into DOORS and want to copy tables over (see this thread). I've found that I can do so manually just the way I want it if I copy the table in Word and then "Paste Special..." in DOORS and select "Microsoft Word Document Object" in the little box that comes up.

But, I can't figure out a way to "Paste Special..." in DXL. olePaste just pastes it as messy text and olePasteLink gives an OLE object like I want, only it's linked, like I don't want.

Is there a way?

Chris
Report this to a Moderator Report this to a Moderator
 1-Aug-2006 07:41
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Chris,

it seems really right, what you are writing - there is no olePaste function, wich will insert the table correctly.
So the only suggestion I would have, is to try to save the part of document into temporary file and insert it into doors :

bool oleInsert(Object, string, bool) InsertOleObjAsIcon
bool oleInsert(Object, string) InsertOleObj


But of cause this is a very ugly solution

It sometimes a really annoying thing ;-)

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 1-Aug-2006 21:30
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

Hi,
Whenever I tried to use the DXL OleMethods I invariably ended up hacking away...fortunately I ended up here PasteSpecial Method For Word 2000, which always had enough information to help me get to a solution.

In particular you need to pass the proper parameters through the Put(Arg...) The parameters for this one are:

PasteSpecial(IconIndex, Link, Placement, DisplayAsIcon, DataType, IconFileName, IconLabel)

The link above should help you further.

HTH
Carlton

PS with the olePasteLink method I believe you can do the paste with the Link parameter set to false (at least you can with Excel not sure if the Word method has the same parameter). If you do it that way you get the table without the link!
Report this to a Moderator Report this to a Moderator
 2-Aug-2006 07:20
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Carlton,

I think, there is a misunderstanding

Chris does not want to paste into Word - but he want's to paste special from Word into Doors. So he meant the Paste Special entry from Doors Edit menu....

May be, I need this stuff in nearer future too, so if anybody has any suggestion, you are very welcme

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 2-Aug-2006 20:41
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

Hi Again,
Perhaps my last response was a little too vague. What I was trying to suggest was that from DOORS you can use Word Methods and properties to manipulate a Word Document during the Import to DOORs process. By this I mean you can:
Select the Table (from your previous thread you already received a response on how to do this),
Cut that to the clipboard (again it looks like you already know how to do that),
PasteSpecial back into Word (as an MS Word Document Object),
Select that object in Word,
Cut that new Object to the clipboard,
then import the object back into DOORs
(yeah it is a process but rather simple once implemented).

Here try this simple experiment:

Create a table in word
Select the table in Word
Cut the table in Word
PasteSpecial as a Word Document Object into word
now cut that Object (the new MS Word Object now is in the system clipboard)
Now go to DOORs and create a module (or use any module)
Add a new object
Select that object
Run the attached DXL (you already have written this code but slightly different)
Voila - the document object now exists in DOORs as an MS Word Document Object!

Looks hard - really isn't!
Hopefully that is a little clearer!
Carlton

PS on the other hand you could create an MS Word VBA to capture all tables and convert them to embedded objects before you import - but I digress
Report this to a Moderator Report this to a Moderator
 3-Aug-2006 01:06
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Now why didn't I think of that? It's brilliant, even if in a Rube Goldberg sort of way.....

I may end up doing something like that. Or like Reik suggested, copy the table to a new doc and just import the whole doc in DOORS. I had hoped for a simpler solution than either of those but it doesn't look like that is possible . The idea of converting tables to objects beforehand also intrigues me.....

Ironically, though, I've got higher-priority stuff coming so this will have to wait a while.

Thanks for the suggestions!

Chris
Report this to a Moderator Report this to a Moderator
 3-Aug-2006 07:33
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Carlton,

very clever approach

Now I understand, what you meant, thank you.

@Chris: I'm from Germany, so did not know Rube Goldberg, sorry. I searched in web ... and see it is a very good comparison

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany

Edited: 3-Aug-2006 at 07:40 by Reik Schroeder
Report this to a Moderator Report this to a Moderator
 3-Aug-2006 13:14
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

Definitely Rube-Goldberg, but sometimes as an engineer that's the only way...

Anyway our workaround has always been that our staff converts all word tables to objects before an export to DOORs (we use the DOORs tool in Word). So I only had to use the above in very rare situations.

We do use the Word Table Objects a lot in DOORS if only to circumvent using DOORs tables which we find cumbersome.

Best Wishes all,
Carlton
Report this to a Moderator Report this to a Moderator
 3-Aug-2006 19:53
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

I hate it when that happens I had some ludicrously over complicated way of getting my word tables into DOORS when I could have written a 6 line VBA macro to do the same thing.
Here's the macro to run on your word document prior to import to DOORS. An obvious trick but I don't think I'm alone in missing it.

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 8-Aug-2006 22:44
User is offline View Users Profile Print this message


Carlton Rubio

Posts: 23
Joined: 22-Jan-2003

Yeah that's good, and precisely what I meant in my PS on 8/2

Nice Job, and Thanks for the update!

Carlton
PS I will use your solution whenever I need to prepare a Word Document for import!
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 09:34
User is offline View Users Profile Print this message


Simon Haydn

Posts: 22
Joined: 14-Sep-2007

Don't know whether anyone else has had trouble with this recently, but I've tried running this code on 8.3 and it imports perfectly, but messes up the format of the Word document it came from (see Table-Circle-Problem.gif - Table Description has moved up the document and now sits within the table). It basically places the converted OLE table on top of any text that was below the table and the attached Table-Circle.gif is how I would expect it to look.

It's treating the OLE as if it is Floating, but I don't know how to code the VBA macro to prevent it from doing this. I've attached the modified VBA macro and used the Placement command to force InLine alignment, but that produces a different type of OLE in Word (see Table-Square.gif). This maintains the format of the original Word document though, but when you import it into DOORS, it imports two tables, one blank and one with the expected table?

Any ideas on how to resolve this? Thanks. Simon.

-------------------------
Simon Haydn BSc (Hons)

Requirements Controller
Marshall Aerospace (UK)
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 13:05
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Just don't save any changes to the Word document before closing it after the import.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.