Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

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?

Regards
0
Chris_m
Asked:
Chris_m
  • 8
  • 7
1 Solution
 
qwaleteeCommented:
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,
qwaletee
0
 
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.
0
 
qwaleteeCommented:
By: Notes document "product"
Do you mean Domino.Doc?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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.

Regards
0
 
qwaleteeCommented:
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?
0
 
Chris_mAuthor Commented:
Its a home grown program which creates a word application; set objWord = CreateObject("Word.Application") etc.
0
 
qwaleteeCommented:
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.
0
 
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.
0
 
qwaleteeCommented:
Chris,

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

or

1) Importing directing

It shoud instead

1) Call word
2) Save as HTML
3) Import HTML
0
 
qwaleteeCommented:
Did you actually change this?

I'd still like to see te code.  It sounds interesting.
0
 
Chris_mAuthor Commented:
I'm not sure that I understand 3) Import html.  
0
 
qwaleteeCommented:
Chris_m,
> 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.)
0
 
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.
Regards
0
 
qwaleteeCommented:
OK, looking forward to it.
0
 
Chris_mAuthor Commented:
Hello qwaletee,
if you give me an email address, I will pass the code to you.
Regards
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now