Word Table in Notes R5

I know that Notes has its own table insertion capability, but I need to be able to insert tables created in Word into a Notes document.  If the table is straightforward such as a 3 x 3, it will go into the notes document without problem, but if the table is 3 x 3 and the first row has the 3 cells merged, then when it goes into the Notes document, the table will become 3 rows of one column with all the contents of the 3 cells bundled together.

Is there any way that I can overcome this?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi Chris_m,

Paste Special, and create it as a Word object, instead of plain Rich Text,  This will allow a perfect representation of what Word has, though with some penalties.

Best regards,
Chris_mAuthor Commented:
Hello Qwaletee,
in our case, Notes documents can be created either through the client in which case there is no problem, or via the Web in which case the person creating the Notes document attaches his Word document to the Web version of the Notes document and the system opens it and pastes the contents of the Word document into the Notes document "product" and when this happens, the colspan disappears.

I hope I have made myself clear.
By: Notes document "product"
Do you mean Domino.Doc?
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Chris_mAuthor Commented:
The Notes database is accessable from either the Web or the Notes Client.  There is a form which allows users to enter data directly into the body of the document produced from that form.  There is a web form for users to create documents via the web, this form provides a field in which the user can enter a filename of a Word document (or notepad etc) and when the web user presses the submit button, the system processes the form and creates a Notes document filling the body of the document with the contents of the Word document.

I got that, but since I don't what's processing the Word content, from the web, I can't tell what is going wrong.

If it is a home grown web Word->Notes application that does the processing, I need to know what it does.  If it is a commercial product, which one?
Chris_mAuthor Commented:
Its a home grown program which creates a word application; set objWord = CreateObject("Word.Application") etc.
Need a little more detail on how it works.  Is all this code running at the server?  Because, with no Notes client, it can't do the operation via cut-and-paste.  It would either require the Notes client, or use of the Notes API.  Any code you can post would be useful.

The basic problem is the difference in the way Word deasl with tables andmerged cells, and the way Notes does it.  In Word, each row exists independeltly, and can have its own list of column definitions.  In Notes, the table has a set structure, and merged cells just have a spanning indicator (all cells are really present).  The importer is fairly old (R2 of Notes, not updated significantly since R3), and builds the table column defintion -- which is fixed across the table -- by looking at the first row of the Word table.

The HTML importer is much better, so if you can save the Word document as HTML and import the resulting HTML file, you are better off.

Either way, i would like to see the existing code.
Chris_mAuthor Commented:
The code is running on the server and the server has the client installed.  The code that does all the Word document processing is in a VB executable and I have the source, but there is a lot of it.  The html option is not possible to test at the moment because the Notes script that actually processes the web document looks for  attachments with .txt, .doc or .rtf file extensions only.

It could continue to look for txt/doc/rtf.  The only difference would be that instead of:

1) Calling word
2) Copying to clipboard
3) Pasting


1) Importing directing

It shoud instead

1) Call word
2) Save as HTML
3) Import HTML

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Did you actually change this?

I'd still like to see te code.  It sounds interesting.
Chris_mAuthor Commented:
I'm not sure that I understand 3) Import html.  
> I'm not sure that I understand 3) Import html.  

Well, without knowing exactly how your application works, I'll assume that it brings in Word content in one of two ways:

1) The Windows clipboard

2) The Notes Word importer, nirtf.dll

Assuming you used #2, you could instead use nihtml.dll, the equivalent of nirtf.dll, but for html files -- which maintains the merged cell formatting

Assuming you used #1, if you save the document as html, closed it and reopened it, then when you have Word place content in teh clipbiard, it wold use a primary format of HTML, so that when it pastes, it uses the HTML paste instead of the Word paste.  The html paste will retain the merged cells.

(Note: clipbiard pastes actually use the file import DLLs behind the scenes.)
Chris_mAuthor Commented:
Hello Qwaletee,
I'm on a course all this week, i'll get back to you early next week. I appreciate the help you are giving and will be happy to let you see the code, but not in this forum.
OK, looking forward to it.
Chris_mAuthor Commented:
Hello qwaletee,
if you give me an email address, I will pass the code to you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.