Question

Export rich text to HTML

Asked by: BarryTice

Greetings.

I have a form that has a number of fields on it including ID, Title and Body. ID and Title are text, Body is rich text.

For the sake of this post, say we have a record where ID is ABCDEF, Title is Mongoose, and Body is:
The <B>mongoose</B>, genus <I>Herpestes</I>, is fast enough to capture and kill venomous snakes.

Please note that for this example I've used html tags for the bold and italics, where in the Notes document they would just be bold and italic as part of the rich text.

On form close, I would like to create an html file in a given directory named ABCDEF.html, with something like this in it:

<html><head><title>Mongoose</title></head>
<body>
<H1>Mongoose</H1>
<br>
<p>The <B>mongoose</B>, genus <I>Herpestes</I>, is fast enough to capture and kill venomous snakes.

</body></html>

The plan is, these html files will eventually be collected and squished into a .chm file. The challenge here is getting Notes to convert the contents of one rich-text field to the appropriate HTML tags, and I don't even really know where to begin.

The rich text field wouldn't contain any heavy formatting, such as  for indentation. There wouldn't be any tables, though there might be bulleted lists. It would also be nice to be able to recognize a specific font style to interpret as, say, an <H3> in the middle of the text.

Of course, there would be other fields on the form that would not be included in the exported html.

Is this possible? I'll gladly throw more points at it depending on the complexity of the solution.

Thanks -- Barry Tice

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2002-03-08 at 13:39:03ID20275074
Topic

Lotus Notes

Participating Experts
4
Points
300
Comments
56

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. RTF to indented Plain Text ? - need converter
    I need a tool (preferably cheap/free) that will convert a rich text document into a pretty-looking plain text file. MS Word has a very limited ability, but I'd like something that allows me to... 1) Indent the text a little deeper by setting, for eg, 1 Indent = 5 spaces. 2...
  2. Indentation
    Hello, I have 3 Lotus Notes DBs (A, B, and C), 2 main DBs (B and C), and a third one used to update the 2 other DBs (A). A database is being accessed from Lotus Notes client, while B and C are web-based databases. I have a button in A, which -when clicked- should copy 2 ri...
  3. Indentation
    Hi I would like to do this printf("%s\t%s\t%d\n", string1 , string2 , number); but the length of string1 and string2 are random, that means some can be as long as 20 (maximum) or as short as the minimum (8 characters). Thus using \t , tab wont indent the word cor...
  4. Add a table to rich text item, using C API
    Hello Guys, I need your help again. A little background information : I'm writing an application that automatically imports the contents of a Microsoft Word document paragraph by paragraph. Depending on the style of the paragraph a new document is created, possible made as a...
  5. Rich TextBox with monospace fonts
    How to use monospace font in a rich textbox? Thanks.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: HemanthaKumarPosted on 2002-03-08 at 14:18:47ID: 6851721

Hi Barry

It is slightly difficult, but seems to be attainable.

Have a button in the form, which will open the current document on web, so that Domino will convert page to html. And you can save that document into the disk. This is basic. Is there something more you are looking for.

~Hemanth

 

by: BarryTicePosted on 2002-03-08 at 15:18:43ID: 6851826

HemanthaKumar --

I don't wish to view the current document on the web. I wish export (for lack of a better word) the text from some of the fields to a .html file. Also, I would like for it to be done automatically on document close any time a record has been opened for edit, so the .html file will always be current relative to the Notes record. Requiring that the user press a button to serve the page as html, and then having the user save the page opens up lots of opportunities for things to happen incorrectly or not at all. (For example, it would be easy to save the file in my example as something other than ABCDEF.html.)

Is there some means in LotusScript to parse a rich-text field for formatting changes and write the appropriate html tags out with the otherwise unformatted text from the rich-text field?

Thanks.

-- b.r.t.

 

by: David_GordonPosted on 2002-03-08 at 15:20:45ID: 6851829

If the primary display method for this text is the web, then your best method is to enter the data in HTML form. Domino will convert Rich Text to HTML but without opening each document on the web, copying the HTML, and pasting it into a new file, what you request is not easily obtainable.

If you're really good you can have a customized web browser cycle through your documents, identify the area you wish to convert, and save the HTML from the Domino-produced version; if you are not a UNIX expert, however, this is likely to be more headache than it is worth.

 

by: zvonkoPosted on 2002-03-09 at 00:28:22ID: 6852423

Hello Barry,

I got your your RecordID, Title and Body generate html file to local disc on Save when Body is RichText. It can of course be converted to an agent doing this on server and generating html file there.

Not all RT attribute are converted but the most. Font is of course converted, but for example <hr> is not :-)

If you are interest, then increase the points to 300 and you can test it, OK?


So long,
zvonko

 

by: zvonkoPosted on 2002-03-09 at 00:32:01ID: 6852426

PS: to get my way working you need at least R5.0.2

 

by: BarryTicePosted on 2002-03-11 at 07:31:13ID: 6855517

zvonko --

We're on 5.0.4a, so that shouldn't be a problem (I hope).

I've upped the points accordingly, and look forward to seeing how you did this.

-- b.r.t.

 

by: zvonkoPosted on 2002-03-11 at 07:32:35ID: 6855523

Hello Barry, how to go on whit this?

 

by: BarryTicePosted on 2002-03-11 at 08:42:35ID: 6855638

zvonko --

Sorry for the delay in getting back to you. EE seems to have gone down as I was submitting my response.

You can post code here if you like or e-mail to barrytice@hotmail.com.

Thanks! -- b.r.t.

Note for the community purists: I understand that this is an information-sharing community and expect to make the final solution available accordingly once this is all said and done.

 

by: HemanthaKumarPosted on 2002-03-11 at 09:00:47ID: 6855667

Yes EE was down for long time !

Here is the code that works as charm

     Dim webdoc As NotesDocument
     Dim webdb As NotesDatabase
     
     ' Load Web Page
     Set webdb = New NotesDatabase( "", "perweb.nsf" )
     SetDocProfile webdb
     Set webdoc = webdb.GetDocumentByURL( "http://www.yahoo.com" , True)
     
     ' Save HTML
     fileNum% = Freefile()
     Open "c:\abcd.html" For Output As fileNum%
     Print #fileNum%, webdoc.HTMLSource(0)
     Close fileNum%

Sub SetDocProfile( webdb As NotesDatabase )
     
     Set view = webdb.GetView("Internet Profiles")
     Set docProfile = view.GetFirstDocument    
     If docprofile Is Nothing Then
          Set docprofile = New NotesDocument(webdb)
          docprofile.Form = "Admin"
          docprofile.StartUpOptions = "1"
          docprofile.OpenURL = "http://notes.net/welcome.nsf"
          docprofile.PreferredSearchEngine = "4"
          docprofile.SearchURL="http://www.search.com/"
          docprofile.ScanAhead = "1"
          docprofile.SearchFrequency = "2"
          docprofile.UpdatesFoundOptions = "1"
          docprofile.SendMailTo = session.UserName
          docprofile.ReduceDays = "2"
          docprofile.KeepPage = "1"
          docprofile.Save True, True
     Else
          docProfile.SaveHTML = "1"
          Call docProfile.Save(True,False)
     End If
     
End Sub

Copy these code into the postsave or querysave depending upon your need.

~Hemanth

 

by: zvonkoPosted on 2002-03-11 at 23:04:00ID: 6855829

Either I or Heman understood something wrong :-)

I understood you like to store a RichText field as html file with file name composed from RecordID field on same Notes document where the RT field is. Additionaly adding the html page Title from another field on same Notes document.

Does Heman's code serve this?

Is requirement something else?

Waiting for feedback.

So long,
zvonko

 

by: ArunkumarPosted on 2002-03-12 at 03:01:44ID: 6856181

Waiting to see Zvonkos reaction for Barry's next comment !

;-)

 

by: BarryTicePosted on 2002-03-12 at 05:31:46ID: 6856556

No, zvonko. HemanthaKumar seems to have misunderstood the requirement. From what I can tell, his code looks at web pages and automatically saves the html to a file. That is not what I need.

I believe your understanding, zvonko, is correct. I have notes documents, and each document has a title field, a name field, and a rich-text body field (and other fields). On document close, I want the title field and body field to be saved as html into a document whose name is determined by the name field. The font characteristics within the body field should be translated into the appropriate html tags.

I do not wish to render my complete document as HTML and then save that, as there will be other fields present that I will not want to display. Of course, I could use another form for that purpose if it came to it. But having to reopen each record on this more limited form, or having to run an agent to do so, would not make this as automatic as I would prefer. If I can have these three fields extracted and saved out as html on document close, which I believe is the solution you, zvonko, have created, I will be happy.

-- b.r.t.

p.s. Sorry for the delay in getting back to this. As I'm sure you noticed yesterday, EE was down for much of the day and I couldn't get back to this post.

 

by: HemanthaKumarPosted on 2002-03-12 at 06:38:21ID: 6856752

If you look at my code it does extract html source. And the way that you have to get your page is like this,

Create another form with required fields that has to be extracted, probably the RIchtext field only and save it and hide this document from Notes.

Secondly, Hide the current Notes document for web users.

Then construct your document url while closing and pass it to getdocumentbyurl function.

The skeleton is there and you need little fine tuining for your purpose. I have that code too. Let me give it to you.

 

by: HemanthaKumarPosted on 2002-03-12 at 07:04:39ID: 6856860

Here is the full working code for your app.

Create a hidden display field called URL, with this formula

"http://" + @Name([CN];@Subset(@DbName;1)) + "/" +
@ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/" ) + "/0/" + @Text(@DocumentUniqueID)

And in querysave use this script:

=========
Sub Querysave(Source As Notesuidocument, Continue As Variant)
     Dim ws As New NotesUIWorkspace
     Dim thisdoc As NotesDocument
     Dim webdoc As NotesDocument
     Dim webdb As NotesDatabase
     
     Set thisdoc = ws.CurrentDocument.Document
     ' Load Web Page
     Set webdb = New NotesDatabase( "", "perweb.nsf" )
     
     url = thisdoc.Url(0)
     htmlfile = "c:\" & thisdoc.Name(0) & ".html"       ' With Appropriate Path
     If Trim(htmlfile) = "" Then
          Msgbox "Name is required"
          Exit Sub ' Continue= false
     End If
     
     SetDocProfile webdb      
     Set webdoc = webdb.GetDocumentByURL( url, True)
     
     ' Save HTML
     fileNum% = Freefile()
     Open htmlfile For Output As fileNum%
     Print #fileNum%, webdoc.HTMLSource(0)
     Close fileNum%
End Sub



Sub SetDocProfile( webdb As NotesDatabase )
     
     Set view = webdb.GetView("Internet Profiles")
     Set docProfile = view.GetFirstDocument    
     If docprofile Is Nothing Then
          Set docprofile = New NotesDocument(webdb)
          docprofile.Form = "Admin"
          docprofile.StartUpOptions = "1"
          docprofile.OpenURL = "http://notes.net/welcome.nsf"
          docprofile.PreferredSearchEngine = "4"
          docprofile.SearchURL="http://www.search.com/"
          docprofile.ScanAhead = "1"
          docprofile.SearchFrequency = "2"
          docprofile.UpdatesFoundOptions = "1"
          docprofile.SendMailTo = session.UserName
          docprofile.ReduceDays = "2"
          docprofile.KeepPage = "1"
          docProfile.SaveHTML = "1"
          docprofile.Save True, True
     Else
          docProfile.SaveHTML = "1"
          Call docProfile.Save(True,False)
     End If
     
End Sub

==========

 

by: BarryTicePosted on 2002-03-12 at 08:07:41ID: 6857139

OK, HemanthaKumar. I see how this could work now. But I have (at least) two major questions about this.
    1: How does Notes know which form to use for viewing this on the Web? If the database has several web-enabled forms, how would it know which one to choose? (I have not done any Notes development for web retrieval yet. See No. 2.)
    2: When I try this, I get the following error message pop-up:
Notes error: The WEB Navigator retrieval process is not running. (http://Server/Subdir/Database.nsf/0/0123456789ABCDEF0123456789ABCDEF)

(Note: that's not actually the exact URL it gives, but it's close enough.)

As I'm a lowly Notes developer (and that's not even officially part of my job description), I do not have the authority to determine which processes we will run on our servers, which are already sluggish. Is this something I can affect? Will it contribute significantly to the server load?

-- b.r.t.

p.s. -- zvonko, I still await your code. The solution I judge best for my purposes gets the 300 points. I'll post other generous points for other solutions that work for me, as I believe in rewarding all efforts appropriately.

 

by: BarryTicePosted on 2002-03-12 at 08:11:05ID: 6857151

Also, HemanthaKumar, I assume you meant this in your Querysave:

If Trim(thisdoc.Name(0)) = "" Then

The way you have it, it puts literal text into the htmlfile variable and immediately checks to see if it is empty.

 

by: HemanthaKumarPosted on 2002-03-12 at 08:47:35ID: 6857292

For Q1

Create another form with the same name as that of the original one Say Notes|WebForm and Web|WebForm. Then look at the Document property of the form from form design view. And check Notes|WebForm  not to be displayed on web and vice versa for Web|WebForm.

For Q2

If you are running the script over the server then you have to enable web task, using "load web" command.

I am using the webdb to local , it should not give that error. Are you using this script in agent or querysave of the form ???

Yes u are correct in a hurry I just put that check it should be If Trim(thisdoc.Name(0)) = "" Then



 

by: BarryTicePosted on 2002-03-12 at 09:45:47ID: 6857479

HemanthaKumar --

Hmm. I didn't know you could name two forms the same thing, but it makes sense with two aliases.

I am using this script in the queryclose on the form, not in an agent.

At first, I tried this in a local testing database, and got essentially the same error. (The difference was the URL started with http:///Database.nsf/... -- three slashes, as the database server and path was local.) So I moved my tests into a little-used database on the server where nobody would interfere with them, but I could test with an on- server database.

In both cases, the error began with "The WEB Navigator retrieval process is not running."

Throughout our company we do not use Notes for any Web access. Is there something that must be set, say, in my location document?

My Web Navigator database is set at perweb.nsf, with Notes set as the Internet browser and "from InterNotes server" set for Retrieve/open pages. The InterNotes server is set to another corporate server in a different OU, some 900 km from where I am located.

Any suggestions?

 

by: zvonkoPosted on 2002-03-12 at 10:30:13ID: 6857644

Hello Barry,

assuming you have this three fields on your form:
FileName: Text;
PageTitle: Text;
Body: RichText;

There is a new Object in Notes R5.0.2: NotesMIMEEntity
http://doc.notes.net/domino_notes/5.0.2/help5_designer.nsf/078c27b23262ffff852566dd0029426a/69d4958583129d2e05256825007c60ba?OpenDocument&AutoFramed&BaseTarget=Topic

With this Object you can let Notes client convert your RichText field to html.
Place the following code into PostSave event of your form:
Sub Postsave(Source As Notesuidocument)
  Dim s As New NotesSession
  Dim doc As NotesDocument
  Dim body As NotesItem
  Dim mime As NotesMIMEEntity
  Dim m As String
  s.ConvertMime = False
  Set doc = Source.Document
  Set body = doc.GetFirstItem("Body")
  If body.Type = MIME_PART Then
    Set mime = body.GetMimeEntity
    htmlBody = "<html><head><title>" & doc.PageTitle(0) & "</title></head>" & _
    "<body><H1>" & doc.PageTitle(0) & "</H1><br>" & _
    mime.ContentAsText & _
    "</body></html>"
    Dim FileNum As Integer
    FileNum = Freefile()
    Open Trim$(doc.FileName(0)) For Output As FileNum
    Print #FileNum, htmlBody
    Close #FileNum
    Messagebox htmlBody,, doc.PageTitle(0)
  End If
End Sub

To get this PostSave working it is important to switch one property of your RichText field on:
StoreContentAsHtmlAndMime

This checkbox is found on second tab of the property dialog of your RichText field.

After closing and saving your document, you will get a html file with the name according to the content of the field: FileName.
Be aware of OS filename and directory dependencies.
You get also for this test a message box with the stored html content. Comment it out after the tests.

Good luck,
zvonko

 

by: HemanthaKumarPosted on 2002-03-12 at 11:49:07ID: 6857926

Ok, here is where you are having error. When you say internotes server, the server should load web task to get pages. You can change this either way

1. Set Internet Browser to "Notes with Internet Explorer"
Or
2. Set Internet Browser to "Notes" and Retrieve from "from Notes workstation"

~Hemanth

 

by: HemanthaKumarPosted on 2002-03-12 at 12:28:39ID: 6858030

MIME idea is not that bad, but the problem with that is it will store the content to HTML format (compatible to web) and loses all the notes features like Tabbed tables and Horizontal rule and whole a lots of other notes features, check the link for details.

http://doc.notes.net/domino_notes/5.0/help5_designer.nsf/078c27b23262ffff852566dd0029426a/1d674341f05f2e388525672f007a33a1?OpenDocument

 

by: zvonkoPosted on 2002-03-12 at 12:41:16ID: 6858066

How do you plan to put TabbedTables into compressed HTML Help metafiles (*.CHM) ?

 

by: HemanthaKumarPosted on 2002-03-12 at 13:14:06ID: 6858165

Tabbed table is just an example !

Check the link for list

 

by: HemanthaKumarPosted on 2002-03-12 at 13:14:51ID: 6858166

And whole plan is just not generating CHM file, you have to preserve the original too.

 

by: BarryTicePosted on 2002-03-12 at 14:45:22ID: 6858458

Thank you all. I just got out of a painfully long meeting, and haven't had time to try this yet. It's my son's birthday, so I can't stay any later tonight. I'll be trying these things first thing in the morning.

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-03-12 at 17:50:54ID: 6859045

Enjoy the day.

So how old is your son ?

 

by: BarryTicePosted on 2002-03-14 at 07:29:07ID: 6864799

Greetings, all.
I'm sorry about not getting back to this yesterday. I was diverted to three other emergencies yesterday, and couldn't work on this at all.

I'm having problems with both approaches.

HemanthaKumar -- I have tried setting the Internet Browser to "Notes with Internet Explorer" and setting the Retrieve to "InterNotes Server". I have also tried leaving Internet Browser on "Notes" and Retrieve on "from Notes Workstation" as you recommended. In both cases, I get an html file created, named as expected. But on both cases, the html file contains only this:
<H1>ERROR</H1>The requested document (URL http://Server/Subdir/Database.nsf/0/6EEC039B5BAAECF086256B7A0056C77D) could not be accessed.<p>The remote server either is not accessible or is refusing to serve the document.

zvonko --
Your approach is creating pages as expected, and I prefer an approach that does not require a specific setting in the user's locations. But when the rich text file is rendered to HTML, there are a few troubles.
    First, Notes is adding a <br> at the beginning of the field. This causes trouble because the next time you open the Notes document, it does it again. Soon you have several blank lines at the beginning of your field, and your text is creeping down the page.
    Second, there is some trouble with bullets. Any text that comes after a bulleted list ends up indented to the same level that the text in the bulleted list was. (Its left edge is aligned with the left edge of the bulleted text, not with the left edge of the bullet. Of course, this remains that way when you open it back up in Notes. but if you select the text and try to outdent it (shift-F8), it outdents all the text up to and including the last bulleted item. If you re-indent the bullet, it bullets all the following text. If you examine the HTML it produces, you find there is no </ul> tag.
    Third, when it renders tables it always sets the width to 100% in the HTML. Of course, when you re-open the file in Notes, the table is expanded to 100% width, as well.
    Do you know of any way to overcome these things?

Thanks again to both of you. You will both be rewarded for your efforts.
(see http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=lotusnotes&qid=20276937)

-- b.r.t.

p.s. my son is now 11, and the grand adventure of the teen years is just beginning....

 

by: zvonkoPosted on 2002-03-14 at 11:07:58ID: 6865647

My son is 12, Barry :-) and I have also a daughter, she is 15.

Sorry for this problems with the MIME rendering. I was so happy founding it, but I see it like you: from the very beginning of Domino was this rendering of simple fonts not as good as one could imagine from such a great system like Domino is. Sorry, but I also have no idea how to improve the rendering. Do you remember NetObjects Fusion? This was an authoring system to circumvent this html authoring problems. You designed all the funny stuff in NetObjects Fusion and had an Domino server task running to upload this stuff to a Notes database. But it seams nobody is using this method; at least I hear nothing about it.

Perhaps is better idea to use Heman proposal. I could imagine that you make some basic URL misleading. Do you know that when your database is located locally on your Notes client, that the Designer is starting in background a nhttp task? You can start it even separately before invoking any http stuff on client. Simply go to a DOS box into program directory of your client and invoke nhttp. You give in your client password and can see all error messages and problems like on Domino console.

Sorry that I had not a better proposal for you.

And for the points is no problem for me. Actually I have no time for the competition with Heman and less time to support you. So give the points please to Heman.

Greetings,
zvonko

 

by: HemanthaKumarPosted on 2002-03-14 at 14:38:50ID: 6866207

How does your url look like when you manually open the saved document in web ? And how does the url field look like ??

 

by: BarryTicePosted on 2002-03-14 at 15:11:12ID: 6866275

zvonko --
Would it not be possible to, as part of the querysave, validate the contents of the field? Assign the mine.ContentAsText to a string and begin with a simple while loop to remove any <br> at the beginning. Then, if the text contains any <ul> tag, look for the final occurrence of an <li> tag. (From what I can tell, that line is the only bullet line that Notes puts a <br> after.) Replace the <br> tag at the end with a </ul> tag.

It's simple text parsing, as that goes. And it is more of a hack than it is good programming. But I'm all in favor of finding what works. I would still prefer this to a solution that required certain settings in the user's location.


HemanthaKumar --
I am having inconsistent results with your method. When it works, it works well. But I cannot get it to work consistently.

I have put the code you provided in the Queryclose on the form that shows in the Notes client. When I create a new document on this form, it creates an HTML file as desired. But when I reopen the Notes record, make changes and resave, it changes the file time on the HTML file, but does not change the contents. Even if I delete the first HTML file, when it saves the file a second time, it appears to be a cached version from the first time it saved the file. This is true even if I quit the local client and restart it.

Do you know of anything I can do to prevent this from reading and saving the cached page? I have tried changing the True in "Set webdoc = webdb.GetDocumentByURL( url, True)" to a 2, as that is an option for the reload parameter that should force reloads under some circumstances. But that didn't do any better than the True (1) above, which should force a reload from the Internet server every time.

For what it's worth, at this point I am no longer getting the "remote server" errors mentioned above. I do not know why they have gone away.

Any help will be most appreciated.

-- b.r.t.

 

by: BarryTicePosted on 2002-03-14 at 15:35:12ID: 6866299

HemanthaKumar --
When I open up one of the error files from the directory where it saves, I get a URL such as this:
C:\NotesHtml\FileName.html

This is exactly what I would expect from that. The URL contained within the error message is as above (with actual names for Server/Subdir/Database.nsf where I have those, for simplicity).

The URL field is hidden and computed for display only. But when I check its contents in the properties box, it shows the same thing as is shown in the error message, starting with "http://" and ending with the doc unique ID.

But, again, it seems to be working now. Perhaps there was cached information from my location that was refreshed when the client was restarted.

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-03-14 at 18:35:21ID: 6866813

The way it seems to work is that, whenever you are getting the webdoc in Querysave, the file handle or some other handle is open forever in nweb task and notes is always using cached information. After subsequent saves the handle should be reaching a max and refuses to serve the page unless you restart notes. Queryclose seems to be right place to retrieve the document and notes seems to be happy & thus closes all file handles. This is what I infer from the testing.

After transfering the code to queryclose, the results seems to be consistent.

 

by: BarryTicePosted on 2002-03-15 at 06:15:59ID: 6867840

HemanthaKumar --
I already had my code in Queryclose, and I am continuing to get the cached information. Perhaps this bug has been corrected in a newer version of Notes? I am on 5.0.4a. But I don't have the authority to upgrade users' clients to something newer.

Which version of the client are you using where this works properly in the Queryclose?

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-03-15 at 06:44:34ID: 6867936

I have 5.04 and 5.09

Sorry I made a little tweak in location doc, which provided me with this consistent results.

Here is what you have to do, Edit the location doc and set the browser to Notes and set the retrieve to internotes. Then in servers tab set internotes server as localhost.

If you place the code in Postsave or queryclose the results are always consistent.

 

by: zvonkoPosted on 2002-03-15 at 06:56:29ID: 6867970

Hi Barry, hi Heman,

for RichText fields is important to know that they are rendered to BackEnd document first when they are stored. Therefore I use in my upper code the event PostSave.

Perhaps it would help with Hemans code too...



 

by: BarryTicePosted on 2002-03-15 at 08:44:45ID: 6868368

HemanthaKumar --
by localhost, do you mean the literal string "localhost"? Or do you mean I should put in the name of the server that is holding the database that is creating all these HTML files?

zvonko --
If the back end file is rendered before the data can be extracted, that still wouldn't prevent some parsing of the data before the HTML file is created. In other words, it might still have extra <br> tags in the beginning of the Notes document, but the HTML file would be OK. That would be possible, wouldn't it?

I posted a question on notes.net describing this html rendering problem and asking if anyone knew if the bugs had been fixed in a release after 5.0.4a. I got back a flame saying I shouldn't be posting bug reports there and I was wasting everybody's time by complaining. No wonder I prefer Experts Exchange.

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-03-15 at 08:50:04ID: 6868399

Yes literally "localhost", so that the server doesn't require to run web task .

 

by: BarryTicePosted on 2002-03-15 at 09:28:42ID: 6868576

HemanthaKumar --

We're back to errors.

I've just tried to create a new record in the test database to see what would happen when I changed it. But when I went to close the record, I got a pop-up error:

Notes Error: The WEB Navigator retrieval process is not running.
(http://Server/Subdir/Database.nsf/0/<32-character doc id>)

Server/Subdir/Database.nsf points to the Notes database in which the new record was created. No HTML file was created.

On the Servers tab of my location, I have InterNotes server set to localhost.
On the Internet Browser tab of my location, I have Internet browser set to Notes.
On the same tab, I have Retrieve/open pages set to from InterNotes server.

I have not done anything to explicitly invoke nhttp, but for what it's worth I had the developer open while performing this test in the client.

Any suggestions?

-- b.r.t.

 

by: zvonkoPosted on 2002-03-15 at 10:18:37ID: 6868793

Hello Barry,

from my point of view, there is no way to prevent this creeping of RichText content line by line, nor is a way to change bullet or table behavior in RichText fields.

This creeping is coming as soon as you turn on this checkbox: StoreContentAsHtmlAndMime
Another RichText field on same form without this flag on do not "creep".

This object property "ContentAsText" is a Read-Only property. There is no way to write back html to RichText.


Sorry.

 

by: HemanthaKumarPosted on 2002-03-19 at 08:03:03ID: 6880150

Hello Barry,

I have no clue of what is happening, let us start with a clean slate. Try deleting perweb.nsf from local and recreate new one from template.

Then revert the location settings
Browser to Notes
Retrieve to Notes Workstation

Start over the process

This fixed the problems and the results seem to be consistent. Let me know if you encounter any problems !

PS: Generate HTML in postsave rather than querysave

~Hemanth

 

by: HemanthaKumarPosted on 2002-03-22 at 11:33:50ID: 6889513

How is it going ?

 

by: BarryTicePosted on 2002-03-22 at 13:06:27ID: 6889785

HemanthaKumar --

Slowly. As I've mentioned in other questions, Notes development isn't part of my job description. It's just a "value-added" feature my employers get -- when I'm not swamped with what they thing my job is supposed to be.

At the end of last week, they moved a whole collection of deadlines up two and a half weeks, and it's been rather frantic around here. I've had to set the Notes development aside, but I will get back to it as soon as I can.

Thanks for your patience.

-- b.r.t.

 

by: BarryTicePosted on 2002-03-26 at 13:39:17ID: 6897652

HemanthaKumar --

When I try this on another user's computer, I get the error message:
     Variant does not contain an object

This is with browser set to Notes and retriev set to From Notes Workstation. This user has only a desktop license, but is typical of those who will be using the database.

If I then return to my own desk and open and close the same record, the HTML file is created.

Any ideas?

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-03-26 at 14:59:34ID: 6897854

Did you debug the code at client's machine.

Probably the user doesn't have perweb.nsf in his local machine.

 

by: BarryTicePosted on 2002-03-27 at 08:13:50ID: 6899478

No, I've done no debugging. But perweb.nsf is present on the local machine.

-- b.r.t.

 

by: zvonkoPosted on 2002-04-17 at 12:30:18ID: 6948824

This seems to be out of sight for a while.
Do you have new infos Barry?

 

by: ArunkumarPosted on 2002-04-17 at 14:24:21ID: 6949051

you are digging old ones buddy ?  Need points badly huh ?

;-)
Arun.

 

by: BarryTicePosted on 2002-04-25 at 14:58:01ID: 6969955

Gentlemen --
Sorry for being out of pocket and not getting back to this earlier.

My job here is officially as a GUI developer using a screen scraper over a 5250 emulation, and Notes development is something they "let" me do on the side. The reality of this is, when work comes down the pipe that matches my job title, I have to do that first.

Also, being somewhat the low man on the pole, even among my Notes work, my efforts are often redirected on the whims of others. Thus I've had to set this aside for now.

I do intend to get back to it as soon as I can. Thanks for your patience.

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-04-26 at 05:10:10ID: 6971021

Let me know where exactly the problem occurs by debugging the code.

 

by: BarryTicePosted on 2002-11-21 at 08:13:34ID: 7478990

zvonko and HemanthaKumar --

I apologize for the 7-month delay on this. My supervisors moved this to the back burner for me as their priorities changed, and I found out last week (through a different source) that they have made a financial commitment to deal with this issue using something other than Notes.

As such, this project is dead in the water.

I wish to award you each full points, as you each came up with good approaches for my problem. But I can only do that if one of you will post into http://www.experts-exchange.com/Applications/Email/Lotus_Notes/Q_20276937.html so I can accept one answer there and another here.

Please do so when it's convenient for you.

Thanks!

-- b.r.t.

 

by: HemanthaKumarPosted on 2002-11-21 at 09:21:13ID: 7479340

As far as I know Zvonko doesn't login to EE anymore.

 

by: BarryTicePosted on 2002-11-21 at 10:00:37ID: 7479529

No zvonko? No stamp? That's a loss to the community. Do you know what chased him away?

 

by: ArunkumarPosted on 2002-11-21 at 10:14:23ID: 7479597

Addiction !

 

by: HemanthaKumarPosted on 2002-11-21 at 11:08:36ID: 7479835

Well, yes it is a lose to the community. He diverted his attention to his religious and personal activities.

 

by: BarryTicePosted on 2002-11-22 at 05:21:27ID: 7483252

I've been told by one of the moderators that zvonko has logged in this month. Apparently he's still visiting, even if he's not participating much.

zvonko --
If you want points, simply post here to let me know you're around and I'll post some for you. Thanks for the help!

-- b.r.t.

 

by: ArunkumarPosted on 2002-11-22 at 05:23:47ID: 7483267

He Quit this month. So, the log the moderators have given you is right. And Zvonko has quit is for sure.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...