Export to Word

Dear Experts,
I need to export a rtf field to word which will have images in it and text.

This rtf field should be displayed in a table(this will be next part)

This is from notes ui

and also, I need to copy images from one rtf to another rtf. Once the image is copied, I need to format the text abd append to the same rtf field to where we have copied image.

So, thier are 2 questions.

1) Export rtf field as it is to WORD
2) Copy one rtf to another rtf  having image and format text to the rtf which have image(appending)

 second part I have completed some what. But I expect good suggestions from experts.

First part where I am struck. Any ideas?

LVL 19
Who is Participating?
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.

For the first part, can all this be done using the client front end?  The easiest way is to create a form that will display just the part taht needs exporting (i.e., the single rich text field).  Then, display teh doc using that form, and either:

* call the export functions
* select all
* copy
* invoke word
* invoke paste
madheeswarAuthor Commented:
Actually this is an Advertisement creation database.

All the fields will have data with the corporate name.

I have to compose on the same uidoc to display how it will looks like before sending it to news paper.

So, based on the corporate name, it should fetch image which is pasted in a different form and its detials.

Job position, and its detailas.
All these data is updated into a rtf field.
First image, then follwed by details. And that too image should be centred.

I need the formating for the above.

And coming to word, once the above is formatted, they will generate it to word and that word is sent to news papers manually by attaching.

So, this is the whole process.

Any ideas?
Thanks in advance.
YOu just almst woke up my wife!  (E-mail to that address sets off a pager)
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Make liberal use of NotesDocument.RenderToRtField

Which also means making as many alternate forms as is needed to use Render2rtf to get the exact result you want.

Among other things, the graphic should exist as a cenetered, in-line image, in a rich text field somewhere.

Displaying the rtf in a table can cause margi problems, but let's cross taht bridge when we come to it.  You can siple sticj the "results" RTF in an actual table o a form, or you can render it tempoarily using a form, and let teh final RTF contain teh form (instead of being embedded in one).
The other thing you can do is buy the Mida LSX, which lets you do any nifty thing under the sun with RTF!  (Say HI to Ben for me, if you do.)
madheeswarAuthor Commented:
Sorry to disturb ur wife.

I like the idea creating a new form for displaying final rtf.

But from thier, for the final version, I have to export it to word. From thier they will send it to news agancies manually or else they will fax.

regarding Midas, I heared about and visited that site also.

My company is not willing to invest even a single cent on this application. Thats why I have posted this question, if anyone can provide any workaround.

Any ideas?

Thanks in advance and sorry to trouble ur wife; and children(do u have?)

Sjef BosmanGroupware ConsultantCommented:
Printing or formatting from Notes is crap. An alternative for Midas: use NotesToPaper from SoftVision, see http://www.NotesToPaper.com

They developed an EXCELLENT piece of work! Their programs allow you to:
- design or change the layout of the forms (on paper)
- use simple calls to one dll to transfer the data (of any type)
- the output can be directly on paper or in RTF, PDF, HTML or XML

Too bad your company doesn't want to spend money on this. I suppose then, since developing this is an enormous lot of work, you work for them for free ;-)

Please mention my name when contacting SoftVision. Unfortunately, I got no shares...

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
madheeswarAuthor Commented:
Is thier no way to have C API to write to word?

yes. My company doesn't want to spend any amount. I should be the person to blame as I thought rtf can be copied to word. But I did not thought of images.

Now, the real problem is that, they want to send the word document with all the formatting completed (with all the data) to news agency. As they can't send notes document for viewing.

I think u got it now.

Any ideas or work arounds?

I will be thankful if anyone can help me in this aspect as it is becoming delay.

Sjef BosmanGroupware ConsultantCommented:
You're in a tight spot then! Most uncomfortable...

The products mentioned above are (of course) C API's, but I know no free product. Yes, you can write rtf yourself, there's a huge Word-document about rtf somewhere on the Microsoft sites, but getting down to the internals of Notes documents can only be done from C (or C++). I suppose the latter is a multi-manyear job, so don't go there!

What I'd suggest about your negociations with your company:
- tell them you are right and wrong: you can create rtf, but it takes a lot of time to develop, and pictures always will be a problem
- tell them the prices of NotesToPaper (or Midas), the total should stay below Euro 2000,00 (German company)
- explain that they will save an enormous lot of money this way, since..
- maintenance of your development will lead to huge expenses
- and what's a mere Euro 2000,00 (equivalent of 5 days work?? for a consultant)

I stipulate there is no free solution.

Alternative: ask a company with one of the products mentioned to do the development... Won't be cheap!
> I like the idea creating a new form for displaying final rtf.

> But from thier, for the final version, I have to export it to word. From thier
> they will send it to news agancies manually or else they will fax.
So?  Once you have it displayed n Notes the way you want it, add fuctionality that will:

1) Open a pane containing that content (i.e., the document usingthat form, or the manipulated result document using that form)
2) Export the pane to MicrosoftRTF
3) Close the pane

That's it!
madheeswarAuthor Commented:
I understood ur logic. to do this also, we need Notes C API. Am I correct?

or is their any available code to do?

Our company is an audit company, So, they will have time to time vacancies. They don't want to invest extra amount on IT as the market is dull and the business is also dull.

Hope u understood the situation.

Thanks for helping.

Any ideas?
I forgot... the graphics don't make it over in a word export. Here are the only things I think you could do:

1) Set it up so the "preview" shows via a web browser as a Domino web HTML page.  Start Word with the URL to that page.

2) Use the Windows API screen capture functions, and capture the preview window as an image.  You can then automate Word to open that image file.

3) You MAY be able to get away with copy only the image to the clipboad, pasting to Word, then copying the rest to the clipbiard, and pasting to Word.  I've tested, and single graphics do go over, though they sometimes seem to go over with an extra border line.  If you have the grahic as a file, you can cetainly dump it to disk, and use Word's OLE Automation to bring the file in.
> I understood ur logic. to do this also, we need Notes C API. Am I correct?
No, you don't.  @Command's will do, as will NotesUiDocument methods.
madheeswarAuthor Commented:
preview on web is Ok. From thier opening word and windows API,
oh man I have to learn a lot of these type of things. Still I am a kid in Notes.

Guys, if u want the below to be in a new question, no problem.

Anyway, person incharge of this project is not available yesterday. So, I spoke today and they agreed without image in word. Just the format should be as it is when they format it in RTF field.

So, here is the new specs.
Copy logo into rtf field first.

Followed by Appending text.(we can format while appending), else use will do the required formatiing.

Once completed, it should export to word without loosing text format from the rtf without image.

So, guys can throw some light on this.

madheeswarAuthor Commented:
I can use @Command([Export])....

It will be simple and easy.
Once they generate to another rtf, and click export, it will compose a new form fetching all the values from rtf field then prompts user to store.

or else, we can give path to store automatically.

Is this good way?

madheeswarAuthor Commented:
I got it work to export to word. Just text only without loosing its format.

Thanks and I will close question soon.
madheeswarAuthor Commented:

Where is assist option man.

It is missing. I thought of sharing both of u.

Anyway, I have another question to close, I will increase there and allot to Qwaletee.
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.