To < Anserkk > about sample < Wordtable.prg >

To < Anserkk > about sample < Wordtable.prg >

Postby ukoenig » Fri Feb 22, 2013 11:38 am

Dear Anser,

At first, thank You very much for Your Word-sample : Wordtable.prg.
Is it possible, to include some extensions ?
Maybe someone else has included the needed lines ?
This questions also belongs to the post of Silvio.
Move a Table into a Word Document


It would be niche, adding the following, to complete the sample :

1. define Top / Left margin ( area / section )
2. adding text on a defined position with font-define
3. move a table to a defined position
4. adding bottom-text
5. maybe a defined page-breack showing long tables.

The normal result

Image

the desired ( formatted ) result

Image

Thank You very much
Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To < Anserkk > about sample < Wordtable.prg >

Postby anserkk » Sat Feb 23, 2013 5:21 am

Dear Mr.Uwe

Table can be aligned right via the following code

Code: Select all  Expand view
#DEFINE wdTableRight           -999996
oTable:Rows:HorizontalPosition = wdTableRight



To add a Line at the top of the word page ( As per the WordTable.Prg). Add the following lines after the word finished the loop creating the Table and totals and before oWord:Visible:=.T.

Code: Select all  Expand view
#DEFINE wdParagraph             4
// Now write some text on the left hand side of the table
oRange:=oWord:ActiveDocument:Range()
oRange:Collapse(wdCollapseStart)

WITH OBJECT oRange
    :ParagraphFormat:Alignment = wdAlignParagraphCentre
    :InsertAfter("Sales Report")
    :MoveEnd(wdParagraph,1)
    :Bold = .T.  

END
oWord:Visible := .t.


I shall try to create a sample as you have specified :)

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: To < Anserkk > about sample < Wordtable.prg >

Postby anserkk » Sat Feb 23, 2013 9:02 am

Dear Mr.Uwe,

Image

WordTable2.Prg
Code: Select all  Expand view
#Include "FiveWin.ch"

* Author: Mr. Anser K.K.
* Export table from DBF to MSWord Document
* Demonstrates how to create tables in MS-Word, align word table and text side by side

#DEFINE wdAlignParagraphLeft    0
#DEFINE wdAlignParagraphCentre  1
#DEFINE wdAlignParagraphRight   2
#DEFINE wdAlignParagraphJustify 3
#DEFINE wdAlignRowRight         2
#DEFINE wdParagraph             4
#DEFINE wdStory                 6
#DEFINE wdCollapseEnd           0
#DEFINE wdCollapseStart         1
#DEFINE wdBorderTop            -1
#DEFINE wdLineStyleDouble       7
#DEFINE wdHeaderFooterPrimary   1
#DEFINE wdTableRight           -999996


#DEFINE CR                     CHR(13)

//--------------------------//
Function Main()

    Local oWord,oRange,oTable,nRecCount,nRow,nTotSalary:=0
   
    USE \FWH\Samples\CUSTOMER
    nRecCount:=RecCount()
   
    oWord:=CREATEOBJECT("Word.Application")
    oWord:Documents:Add()
   
    oRange:=oWord:ActiveDocument:Range()
   
    // Move to the end of the document, leave 2 empty lines
    oRange:MoveEnd( wdStory )
    oRange:Collapse( wdCollapseEnd )
    oRange:InsertAfter( CR + CR )
    oRange:Collapse( wdCollapseEnd )
   
    // Add a table with 2 rows and 3 columns
    oTable:=oWord:ActiveDocument:Tables:Add(oRange,2,3)
   
    WITH OBJECT oTable
       // Set up borders and shading
       // If u dont want borders then set the below lines 2 lines to .F.
       :Borders:InsideLineStyle:=.T.
       :Borders:OutsideLineStyle:=.T.
       
       // Set the position of the table towards the right side of the word document
       :Rows:HorizontalPosition = wdTableRight
   
       // Shade first row for headings
    #ifdef __XHARBOUR__
       :Rows[1]:Shading:Texture = 100
    #else
       :Rows(1):Shading:Texture = 100
    #endif
   
       // Put heading text in and set alignment
       :Cell(1,1):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
       :Cell(1,1):Range:InsertAfter("Last Name")
   
   
       :Cell(1,2):Range:ParagraphFormat:Alignment:=wdAlignParagraphRight
       :Cell(1,2):Range:InsertAfter("Salary")
   
       :Cell(1,3):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
       :Cell(1,3):Range:InsertAfter("Hire Date")
   
       // Format data cells
       :Cell(2,1):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
       :Cell(2,2):Range:ParagraphFormat:Alignment:=wdAlignParagraphRight
       :Cell(2,3):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
   
       // Add data and format
       nTotSalary:=0
       For nRow:=1 to 20 // nRecCount
   
    #ifdef __XHARBOUR__
           WITH OBJECT :Rows[nRow + 1]
               :Cells[1]:Range:InsertAfter( Trim( Customer->LAST ) )
               :Cells[2]:Range:InsertAfter( Customer->SALARY  )
               :Cells[3]:Range:InsertAfter( Customer->HIREDATE  )
           END
    #else
           WITH OBJECT :Rows(nRow + 1)
               :Cells(1):Range:InsertAfter( Trim( Customer->LAST ) )
               :Cells(2):Range:InsertAfter( Customer->SALARY  )
               :Cells(3):Range:InsertAfter( Customer->HIREDATE  )
           END
    #endif
   
           // Add a new Row
           :Rows:Add()
   
           // Calculating total
           nTotSalary+=Customer->SALARY
   
           Skip
   
       Next
   
       // Total row shade and place total
    #ifdef __XHARBOUR__
       :Rows[ nRow + 1 ]:Shading:Texture = 100
       WITH OBJECT :Rows[ nRow + 1 ]
           :Cells[1]:Range:InsertAfter("Total Salary")
           :Cells[2]:Range:InsertAfter(nTotSalary)
       END
    #else
       :Rows( nRow + 1 ):Shading:Texture = 100
       WITH OBJECT :Rows( nRow + 1 )
           :Cells(1):Range:InsertAfter("Total Salary")
           :Cells(2):Range:InsertAfter(nTotSalary)
       END
    #endif
   
       // Size columns, for simplicity, let word do the work
       :Columns:Autofit()
    END
   
    // Now write some text on the left hand side of the table
    oRange:= oTable:Range
    oRange:Collapse(wdCollapseEnd) // Move insertion point beyond table
   
    WITH OBJECT oRange
        :ParagraphFormat:Alignment = wdAlignParagraphCentre
        :InsertAfter("Employees Status Report")
        :MoveEnd(wdParagraph,1)
        :Bold = .T.  
        :Collapse(wdCollapseEnd)
        :InsertParagraphAfter()
        :MoveEnd(wdParagraph,1)
        :Bold = .F.
        :Collapse(wdCollapseEnd)
   
        :ParagraphFormat:Alignment = wdAlignParagraphLeft
        :InsertParagraphAfter()
        :InsertParagraphAfter()
        :ParagraphFormat:Alignment = wdAlignParagraphLeft
        :InsertAfter("This paragraph is left aligned. ")
        :InsertParagraphAfter()
        :InsertParagraphAfter()
        :Collapse(wdCollapseEnd)
   
        :ParagraphFormat:Alignment = wdAlignParagraphRight
        :Collapse(wdCollapseEnd)
        :ParagraphFormat:Alignment = wdAlignParagraphRight
        :InsertAfter("This paragraph is right aligned.")
        :Collapse(wdCollapseEnd)   
       
        :InsertParagraphAfter()
        :InsertParagraphAfter()
        :Collapse(wdCollapseEnd)
        :ParagraphFormat:Alignment = wdAlignParagraphJustify
        :InsertAfter(REPLICATE("This is a long paragraph that "+;
            "needs to wrap around a table that will fit in the "+;
            "paragraph. ", 3))
        :Collapse(wdCollapseEnd)   
   
    END
   
    // Setting Header
    WITH OBJECT oWord:ActiveDocument:Sections[1]:Headers[ wdHeaderFooterPrimary ]
        oRange = :Range()
        WITH OBJECT oRange
            :Text = "My Page Header"
            :ParagraphFormat:Alignment:= wdAlignParagraphCentre
        END                              
    END
   
    // Setting Footer
    WITH OBJECT oWord:ActiveDocument:Sections[1]:Footers[ wdHeaderFooterPrimary ]
        oRange = :Range()
        WITH OBJECT oRange
            :Text = "My Page Footer"
            :ParagraphFormat:Alignment:= wdAlignParagraphCentre
        END                              
    END
   
    oWord:Visible := .t.

Return nil


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: To < Anserkk > about sample < Wordtable.prg >

Postby ukoenig » Sat Feb 23, 2013 3:29 pm

Mr. Anserkk,

thank You very much for the extended version.
It will grow to a complete sample.
I tested adding fonts to the different sections :
( the red underlines are visible because of syntax-check german )

Image

Code: Select all  Expand view

// Put heading text in and set alignment
:Cell(1,1):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
:Cell(1,1):Range:InsertAfter("Last Name")
:Cell(1,1):Range:Font:Size = 16
:Cell(1,1):Range:Font:Name = "Arial Black"  
:Cell(1,1):Range:Bold = .T.      
:Cell(1,2):Range:ParagraphFormat:Alignment:=wdAlignParagraphRight
:Cell(1,2):Range:InsertAfter("Salary")
:Cell(1,2):Range:Bold = .T.
...
...
...
WITH OBJECT oRange
:Font:Size = 16
:Font:Name = "Arial Black"
:Bold = .T.  
:ParagraphFormat:Alignment = wdAlignParagraphCentre
:InsertAfter("Employees Status Report")
:MoveEnd(wdParagraph,1)
:Collapse(wdCollapseEnd)
:InsertParagraphAfter()
:MoveEnd(wdParagraph,1)
:Bold = .F.
:Collapse(wdCollapseEnd)
...
...
:Cell(1,3):Range:ParagraphFormat:Alignment:=wdAlignParagraphLeft
:Cell(1,3):Range:InsertAfter("Hire Date")
:Cell(1,3):Range:Bold = .T.
...
...
// Setting Header
WITH OBJECT oWord:ActiveDocument:Sections[1]:Headers[ wdHeaderFooterPrimary ]
     oRange = :Range()
     :Font:Size = 22
     :Font:Name = "Arial Black"        
     WITH OBJECT oRange
          :Text = "My Page Header"
          :ParagraphFormat:Alignment:= wdAlignParagraphCentre
     END                              
END
 


Best Regards
Uwe :lol:
Last edited by ukoenig on Sat Feb 23, 2013 3:45 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To < Anserkk > about sample < Wordtable.prg >

Postby Bayron » Sat Feb 23, 2013 3:43 pm

Nice Sample... Thanks Anser and Uwe for Sharing...

Can this table be saved to file without oppening MicroSoft Word????

Can it also be printed programatically???? With or without oppening MS Word???
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: To < Anserkk > about sample < Wordtable.prg >

Postby ukoenig » Sat Feb 23, 2013 3:51 pm

Bayron,

I think there is a quite-mode like in Excel.
As soon everything is completed, I will create a litte tool ( like I have done with Excel ),
to test the different selections.

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To < Anserkk > about sample < Wordtable.prg >

Postby Bayron » Sat Feb 23, 2013 3:58 pm

Thanks Uwe....

I have also noticed that if I increase
Code: Select all  Expand view
For nRow:=1 to 20

to let's say:
Code: Select all  Expand view
For nRow:=1 to 30

Code: Select all  Expand view
:InsertAfter("Employees Status Report")


Inserts the text at the last page...

Is there a way to specify, on which page to include the text????

I'm sure all this questions will be addressed on the right moment...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: To < Anserkk > about sample < Wordtable.prg >

Postby ukoenig » Sat Feb 23, 2013 4:38 pm

Yes Byron,
it is a section, not touched very much in the past, only infos about Excel.
I think Word will be more useful for us, using it as a reportwriter.

Best Regards
Uwe :lol:
Last edited by ukoenig on Sat Feb 23, 2013 4:59 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To < Anserkk > about sample < Wordtable.prg >

Postby anserkk » Sat Feb 23, 2013 4:57 pm

Bayron wrote:Nice Sample... Thanks Anser and Uwe for Sharing...

Can this table be saved to file without oppening MicroSoft Word????

Can it also be printed programatically???? With or without oppening MS Word???


Yes. Without making word visible
oWord:Visible:=.F.

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: To < Anserkk > about sample < Wordtable.prg >

Postby ukoenig » Sat Feb 23, 2013 5:03 pm

Save and printing :

oWord:ActiveDocument:SaveAs("c:\temp\test.doc")
oWord:PrintOut()
oWord:Quit()
release object oRange, oWord
oWord = null
// Finally, stub out the reference to make sure it's released

setting margins :

#define InchToPoints 72
oword:activedocument:pagesetup:TopMargin := InchToPoint * 1.5
oword:activedocument:pagesetup:BottomMargin := InchToPoint * 2


Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To < Anserkk > about sample < Wordtable.prg >

Postby Silvio.Falconi » Mon Feb 25, 2013 7:55 am

and I found this parameters to insert Table style


#DEFINE wdTableFormatNone 0
#DEFINE wdTableFormatSimple1 1
#DEFINE wdTableFormatSimple2 2
#DEFINE wdTableFormatSimple3 3
#DEFINE wdTableFormatClassic1 4
#DEFINE wdTableFormatClassic2 5
#DEFINE wdTableFormatClassic3 6
#DEFINE wdTableFormatClassic4 7
#DEFINE wdTableFormatColorful1 8
#DEFINE wdTableFormatColorful2 9
#DEFINE wdTableFormatColorful3 10
#DEFINE wdTableFormatColumns1 11
#DEFINE wdTableFormatColumns2 12
#DEFINE wdTableFormatColumns3 13
#DEFINE wdTableFormatColumns4 14
#DEFINE wdTableFormatColumns5 15
#DEFINE wdTableFormatGrid1 16
#DEFINE wdTableFormatGrid2 17
#DEFINE wdTableFormatGrid3 18
#DEFINE wdTableFormatGrid4 19
#DEFINE wdTableFormatGrid5 20
#DEFINE wdTableFormatGrid6 21
#DEFINE wdTableFormatGrid7 22
#DEFINE wdTableFormatGrid8 23
#DEFINE wdTableFormatList1 24
#DEFINE wdTableFormatList2 25
#DEFINE wdTableFormatList3 26
#DEFINE wdTableFormatList4 27
#DEFINE wdTableFormatList5 28
#DEFINE wdTableFormatList6 29
#DEFINE wdTableFormatList7 30
#DEFINE wdTableFormatList8 31
#DEFINE wdTableFormat3DEffects1 32
#DEFINE wdTableFormat3DEffects2 33
#DEFINE wdTableFormat3DEffects3 34
#DEFINE wdTableFormatContemporary 35
#DEFINE wdTableFormatElegant 36
#DEFINE wdTableFormatProfessional 37
#DEFINE wdTableFormatSubtle1 38
#DEFINE wdTableFormatSubtle2 39
#DEFINE wdTableFormatWeb1 40
#DEFINE wdTableFormatWeb2 41
#DEFINE wdTableFormatWeb3 42



sample :

WITH OBJECT oTable
:AutoFormat:= wdTableFormatList7
END
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To < Anserkk > about sample < Wordtable.prg >

Postby Silvio.Falconi » Mon Feb 25, 2013 8:01 am

and we can use also text() instead of InsertAfter()

Sample:
:Cells[1]:Range:Text( "INDIRIZZO" )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To < Anserkk > about sample < Wordtable.prg >

Postby Silvio.Falconi » Mon Feb 25, 2013 9:16 am

Anserkk,

I found also these parameters to set a Word document but I not understood How

//wdBorder
//wdColor
//WdCountry
//WdDefaultTableBehavior
//WdExportRange
//wdHeaderFooter
//WdLineWidth
//wdLineStyle

My Word.ch

Code: Select all  Expand view


// Paragraph
    #DEFINE wdAlignParagraphLeft    0
    #DEFINE wdAlignParagraphCentre  1
    #DEFINE wdAlignParagraphRight   2
    #DEFINE wdAlignParagraphJustify 3




    #DEFINE wdAlignRowRight         2
    #DEFINE wdSentence              3
    #DEFINE wdParagraph             4
    #DEFINE wdLine                  5
    #DEFINE wdStory                 6




    #DEFINE wdCollapseEnd           0    //Collapse the range to the ending point.
    #DEFINE wdCollapseStart         1    //Collapse the range to the starting point.






// Borders

     #DEFINE  wdBorderBottom        -3   //A bottom border.
     #DEFINE  wdBorderDiagonalDown  -7  //A diagonal border starting in the upper-left corner.
     #DEFINE  wdBorderDiagonalUp    -8   //A diagonal border starting in the lower-left corner.
     #DEFINE  wdBorderHorizontal    -5    //Horizontal borders.
     #DEFINE  wdBorderLeft          -2    //A left border.
     #DEFINE  wdBorderRight         -4   //A right border.
     #DEFINE  wdBorderTop           -1    //A top border.
     #DEFINE  wdBorderVertical      -6   //Vertical borders.




  //Colors
   #DEFINE  wdColorAqua           13421619  // Aqua color.
   #DEFINE  wdColorAutomatic      -16777216 // Automatic color. Default; usually black.
   #DEFINE  wdColorBlack          0         // Black color.
   #DEFINE  wdColorBlue           1671168   // Blue color.
   #DEFINE  wdColorBlueGray       10053222  // Blue-gray color.
   #DEFINE  wdColorBrightGreen    65280     // Bright green color.
   #DEFINE  wdColorBrown          13209     // Brown color.
   #DEFINE  wdColorDarkBlue       8388608   // Dark blue color.
   #DEFINE  wdColorDarkGreen      13056     // Dark green color.
   #DEFINE  wdColorDarkRed        128       // Dark red color.
   #DEFINE  wdColorDarkTeal       6697728   // Dark teal color.
   #DEFINE  wdColorDarkYellow     32896     // Dark yellow color.
   #DEFINE  wdColorGold           52479     // Gold color.
   #DEFINE  wdColorGray05         15987699  // Shade 05 of gray color.
   #DEFINE  wdColorGray10         15132390  // Shade 10 of gray color.
   #DEFINE  wdColorGray125        14737632  // Shade 125 of gray color.
   #DEFINE  wdColorGray15         14277081  // Shade 15 of gray color.
   #DEFINE  wdColorGray20         13421772  // Shade 20 of gray color.
   #DEFINE  wdColorGray25         12632256  // Shade 25 of gray color.
   #DEFINE  wdColorGray30         11776947  // Shade 30 of gray color.
   #DEFINE  wdColorGray35         10921638  // Shade 35 of gray color.
   #DEFINE  wdColorGray375        10526880  // Shade 375 of gray color.
   #DEFINE  wdColorGray40         10066329  // Shade 40 of gray color.
   #DEFINE  wdColorGray45         9211020   // Shade 45 of gray color.
   #DEFINE  wdColorGray50         8421504   // Shade 50 of gray color.
   #DEFINE  wdColorGray55         7566195   // Shade 55 of gray color.
   #DEFINE  wdColorGray60         6710886   // Shade 60 of gray color.
   #DEFINE  wdColorGray625        6316128   // Shade 625 of gray color.
   #DEFINE  wdColorGray65         5855577   // Shade 65 of gray color.
   #DEFINE  wdColorGray70         5000268   // Shade 70 of gray color.
   #DEFINE  wdColorGray75         4210752   // Shade 75 of gray color.
   #DEFINE  wdColorGray80         3355443   // Shade 80 of gray color.
   #DEFINE  wdColorGray85         2500134   // Shade 85 of gray color.
   #DEFINE  wdColorGray875        2105376   // Shade 875 of gray color.
   #DEFINE  wdColorGray90         1644825   // Shade 90 of gray color.
   #DEFINE  wdColorGray95         789516    // Shade 95 of gray color.
   #DEFINE  wdColorGreen          32768     // Green color.
   #DEFINE  wdColorIndigo         10040115  // Indigo color.
   #DEFINE  wdColorLavender       16751052  // Lavender color.
   #DEFINE  wdColorLightBlue      16737843  // Light blue color.
   #DEFINE  wdColorLightGreen     13434828  // Light green color.
   #DEFINE  wdColorLightOrange    39423     // Light orange color.
   #DEFINE  wdColorLightTurquoise 16777164  // Light turquoise color.
   #DEFINE  wdColorLightYellow    10092543  // Light yellow color.
   #DEFINE  wdColorLime           52377     // Lime color.
   #DEFINE  wdColorOliveGreen     13107     // Olive green color.
   #DEFINE  wdColorOrange         26367     // Orange color.
   #DEFINE  wdColorPaleBlue       16764057  // Pale blue color.
   #DEFINE  wdColorPink           16711935  // Pink color.
   #DEFINE  wdColorPlum           6697881   // Plum color.
   #DEFINE  wdColorRed            255       // Red color.
   #DEFINE  wdColorRose           13408767  // Rose color.
   #DEFINE  wdColorSeaGreen       6723891   // Sea green color.
   #DEFINE  wdColorSkyBlue        16763904  // Sky blue color.
   #DEFINE  wdColorTan            10079487  // Tan color.
   #DEFINE  wdColorTeal           8421376   // Teal color.
   #DEFINE  wdColorTurquoise      16776960  // Turquoise color.
   #DEFINE  wdColorViolet         8388736   // Violet color.
   #DEFINE  wdColorWhite          16777215  // White color.
   #DEFINE  wdColorYellow         65535     // Yellow color.




 //WdCountry Enumeration (Word)
  #DEFINE  wdItaly   39    //Italy
  #DEFINE  wdSpain   34    //Spain
  #DEFINE  wdUK      44   //United Kingdom
  #DEFINE  wdGermany 49   //Germany
  #DEFINE  wdFrance  33   //France


 //WdDefaultTableBehavior Enumeration (Word)
 #DEFINE wdWord8TableBehavior   0  Disables AutoFit. Default.
 #DEFINE wdWord9TableBehavior   1  Enables AutoFit


 //WdExportRange Enumeration (Word)
 #DEFINE wdExportAllDocument  0  //Exports the entire document.
 #DEFINE wdExportCurrentPage  2  //Exports the current page.
 #DEFINE wdExportFromTo       3  //Exports the contents of a range using the starting and ending positions.
 #DEFINE wdExportSelection    1  //Exports the contents of the current selection.


 //footer
 #DEFINE wdHeaderFooterPrimary    1   //Returns the header or footer on all pages other than the first page of a document or section.
 #DEFINE wdHeaderFooterEvenPages  3   //Returns all headers or footers on even-numbered pages.
 #DEFINE wdHeaderFooterFirstPage  2   //Returns the first header or footer in a document or section.



  //WdLineWidth Enumeration (Word)
#DEFINE  wdLineWidth025pt  2  //   0.25 point.
#DEFINE  wdLineWidth050pt  4  //   0.50 point.
#DEFINE  wdLineWidth075pt  6  //   0.75 point.
#DEFINE  wdLineWidth100pt  8  //   1.00 point. default.
#DEFINE  wdLineWidth150pt  12 //   1.50 points.
#DEFINE  wdLineWidth225pt  18 //   2.25 points.
#DEFINE  wdLineWidth300pt  24 //   3.00 points.
#DEFINE  wdLineWidth450pt  36 //   4.50 points.
#DEFINE  wdLineWidth600pt  48 //   6.00 points.


   //wdLineStyle Enumeration (Word)
#DEFINE   wdLineStyleDashDot                5  //  A dash followed by a dot.
#DEFINE   wdLineStyleDashDotDot             6  //  A dash followed by two dots.
#DEFINE   wdLineStyleDashDotStroked        20  //  A dash followed by a dot stroke, thus rendering a border similar to a barber pole.
#DEFINE   wdLineStyleDashLargeGap           4  //  A dash followed by a large gap.
#DEFINE   wdLineStyleDashSmallGap           3  //  A dash followed by a small gap.
#DEFINE   wdLineStyleDot                    2  //  Dots.
#DEFINE   wdLineStyleDouble                 7  //  Double solid lines.
#DEFINE   wdLineStyleDoubleWavy            19  //  Double wavy solid lines.
#DEFINE   wdLineStyleEmboss3D              21  //  The border appears to have a 3-D embossed look.
#DEFINE   wdLineStyleEngrave3D             22  //  The border appears to have a 3-D engraved look.
#DEFINE   wdLineStyleInset                 24  //  The border appears to be inset.
#DEFINE   wdLineStyleNone                   0  //  No border.
#DEFINE   wdLineStyleOutset                23  //  The border appears to be outset.
#DEFINE   wdLineStyleSingle                 1  //  A single solid line.
#DEFINE   wdLineStyleSingleWavy            18  //  A single wavy solid line.
#DEFINE   wdLineStyleThickThinLargeGap     16  //  An internal single thick solid line surrounded by a single thin solid line with a large gap between them.
#DEFINE   wdLineStyleThickThinMedGap       13  //  An internal single thick solid line surrounded by a single thin solid line with a medium gap between them.
#DEFINE   wdLineStyleThickThinSmallGap     10  //  An internal single thick solid line surrounded by a single thin solid line with a small gap between them.
#DEFINE   wdLineStyleThinThickLargeGap     15  //  An internal single thin solid line surrounded by a single thick solid line with a large gap between them.
#DEFINE   wdLineStyleThinThickMedGap       12  //  An internal single thin solid line surrounded by a single thick solid line with a medium gap between them.
#DEFINE   wdLineStyleThinThickSmallGap      9  //  An internal single thin solid line surrounded by a single thick solid line with a small gap between them.
#DEFINE   wdLineStyleThinThickThinLargeGap 17  //  An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a large gap between all lines.
#DEFINE   wdLineStyleThinThickThinMedGap   14  //  An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a medium gap between all lines.
#DEFINE   wdLineStyleThinThickThinSmallGap 11  //  An internal single thin solid line surrounded by a single thick solid line surrounded by a single thin solid line with a small gap between all lines.
#DEFINE   wdLineStyleTriple                 8  //  Three solid thin lines.


 




Then could we can Know how save the document with these parameters ?

#DEFINE wdDoNotSaveChanges 0 // Do not save pending changes.
#DEFINE wdPromptToSaveChanges -2 // Prompt the user to save pending changes.
#DEFINE wdSaveChanges -1 // Save pending changes automatically without prompting the user.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], SantaCroya and 112 guests