Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Terry Comeau 8.Mar.12 10:21 AM a Web browser
General 7.0.3 Windows XP


I'm creating a table in a rich text field. First I write the table title text into the field then I create (append) the table itself. The title text sits to the far left, no margin. The table though sits about 1.6 centimeters (11/16th inch) away from the left (has a margin).

Examples:

Title Text
Table starts here.

Should be:

Title Text
Table should start here

Can anyone tell me what is wrong with my code and how I can make the table sit all the way to the left?

Here is my code:

' Setup text styles used in the document.
' table 1
Set columnHeaderStyle1 = sesNotes.CreateRichTextStyle( )
columnHeaderStyle1.Bold = True
columnHeaderStyle1.Fontsize = 8
'columnHeaderStyle1.NotesFont = rtf.GetNotesFont("Gill Sans", True)
Set dataStyle1 = sesNotes.CreateRichTextStyle( )
dataStyle1.Bold = False
dataStyle1.Fontsize = 8
dataStyle1.NotesFont = FONT_ROMAN

For i = 0 To 12
Set columnStyles1(i) = sesNotes.CreateRichTextParagraphStyle
columnStyles1(i).LeftMargin = 0 ' position relative to cell border.
columnStyles1(i).FirstLineLeftMargin = 0
Next

columnStyles1(0).RightMargin = .6 * RULER_ONE_CENTIMETER
columnStyles1(0).Alignment = ALIGN_CENTER
columnStyles1(1).RightMargin =1.1 * RULER_ONE_CENTIMETER
columnStyles1(1).Alignment = ALIGN_CENTER
columnStyles1(2).RightMargin = 1.1 * RULER_ONE_CENTIMETER
columnStyles1(2).Alignment = ALIGN_CENTER
columnStyles1(3).RightMargin = 1.2 * RULER_ONE_CENTIMETER
columnStyles1(3).Alignment = ALIGN_CENTER
columnStyles1(4).RightMargin = 1.0 * RULER_ONE_CENTIMETER
columnStyles1(4).Alignment = ALIGN_CENTER
columnStyles1(5).RightMargin = .8 * RULER_ONE_CENTIMETER
columnStyles1(5).Alignment = ALIGN_CENTER
columnStyles1(6).RightMargin = .6 * RULER_ONE_CENTIMETER
columnStyles1(6).Alignment = ALIGN_CENTER
columnStyles1(7).RightMargin = 2.0 * RULER_ONE_CENTIMETER
columnStyles1(7).Alignment = ALIGN_CENTER
columnStyles1(8).RightMargin = 1.3 * RULER_ONE_CENTIMETER
columnStyles1(8).Alignment = ALIGN_CENTER
columnStyles1(9).RightMargin = 1.4 * RULER_ONE_CENTIMETER
columnStyles1(9).Alignment = ALIGN_CENTER
columnStyles1(10).RightMargin = 1.4 * RULER_ONE_CENTIMETER
columnStyles1(10).Alignment = ALIGN_CENTER
columnStyles1(11).RightMargin = 1.4 * RULER_ONE_CENTIMETER
columnStyles1(11).Alignment = ALIGN_CENTER
columnStyles1(12).RightMargin = 1.5 * RULER_ONE_CENTIMETER
columnStyles1(12).Alignment = ALIGN_CENTER

' set up table headers
Dim rti As New NotesRichTextItem(docSYD, "rtfBins")

richStyle.Bold = True
Call rti.AppendStyle(richStyle)
Call rti.AppendText("Table Title")
richStyle.Bold = False

Call rti.AppendTable(20, 13,,,columnStyles1)

rti.AppendStyle dataStyle1

Set rtnav = rti.CreateNavigator( )

rtnav.FindLastElement RTELEM_TYPE_TABLE
Set table = rtnav.GetElement

rtnav.FindNextElement RTELEM_TYPE_TABLECELL

rti.AppendStyle columnHeaderStyle1
richStyle.Bold = True
Call rti.AppendStyle(richStyle)

rti.BeginInsert rtnav
rti.AppendText ("Bin #")
rti.EndInsert

etc.






table via LotusScript (Terry Comeau 8.Mar.12)
. . RE: table via LotusScript (Terry Comeau 8.Mar.12)
. . RE: table via LotusScript (Terry Comeau 8.Mar.12)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite