Encontré esta tabla de colores de Power Builder y la publico para que no se pierda... porsupuesto con link a la fuente
miércoles, 5 de diciembre de 2012
Colores en Power Builder
Estimados,
Encontré esta tabla de colores de Power Builder y la publico para que no se pierda... porsupuesto con link a la fuente
Encontré esta tabla de colores de Power Builder y la publico para que no se pierda... porsupuesto con link a la fuente
jueves, 6 de septiembre de 2012
PowerBuilder con Word
He encontrado este artículo en http://www.lawebdelprogramador.com/foros/Power_Builder/764974-PowerBuilder_con_Word.html
Y como me ha sido de mucha ayuda, me he permitido traerlo por si un día lo quitan
Saludos
Y como me ha sido de mucha ayuda, me he permitido traerlo por si un día lo quitan
Saludos
Asunto: | PowerBuilder con Word |
Autor: | Miguel Zurita R. (2 intervenciones) |
Fecha: | 28/02/2007 14:22:05 |
A toda la gente que intenta trabajar con Word
ahi va eso
esto esta probado con PB 8 y word 2003
OLEObject ole_object
integer li_result, li_n,NbrRows
string ls_nombre , str
long i_handle
str = "New Text"
ole_object = CREATE OleObject
li_result = ole_object.ConnectToNewObject("word.application")
IF li_result <> 0 THEN
DESTROY ole_object
MessageBox("OLE Error", "No puede conectarse a Word " &
+ "Código: " &
+ String(li_result))
SetPointer(Arrow!)
RETURN
END IF
//Abrir el documento
ole_object.documents.open("C:\Prueba.doc")
ole_object.visible=true
//Para crear un documento nuevo basado en Normal.dot
//OLE_OBJECT.Documents.Add()
//Tamaño papel
//Tabloid=1, Letter=2, Legal=4, Executive=5,A3=6, A5=9, etc.
ole_object.ActiveDocument.pagesetup.Papersize= 7 // A4
//Orientación
ole_object.ActiveDocument.pagesetup.Orientation= 1 // Portrait
//Márgenes
ole_object.ActiveDocument.pagesetup.LeftMargin=ole_object.CentimetersToPoints( 2.5)
ole_object.ActiveDocument.pagesetup.RightMargin=ole_object.CentimetersToPoints( 2)
ole_object.ActiveDocument.pagesetup.TopMargin=ole_object.CentimetersToPoints( 2.5)
ole_object.ActiveDocument.pagesetup.BottomMargin=ole_object.CentimetersToPoints( 2)
//Insert algún texto en un nuevo párrafo
ole_object.Selection.Font.Name = "Verdana"
ole_object.Selection.Font.Bold = TRUE
ole_object.Selection.Font.Italic = TRUE
ole_object.Selection.Font.Underline = TRUE
ole_object.Selection.Font.Color =rgb(255,0,0)
ole_object.Selection.Font.Size = 16
ole_object.Selection.TypeParagraph()
ole_object.selection.ParagraphFormat.Alignment = 1
ole_object.Selection.TypeText( "TITULO" + '~r~n')
ole_object.Selection.Font.Size = 10
ole_object.selection.ParagraphFormat.Alignment = 2
ole_object.Selection.TypeText( 'Dia : ' + string(today() , 'yyyy/mm/dd?') + '~r~n')
ole_object.Selection.typetext("~n")
ole_object.selection.ParagraphFormat.Alignment = 3
ole_object.Selection.typetext("prueba")
ole_object.Selection.typetext("~n")
ole_object.Selection.TypeParagraph()
//Selecciona la parte indicada
//ole_object.selection.MoveLeft(1,8,1)
//ole_object.selection.TypeBackspace()
//ole_object.selection.goto(true,0,0,str)
// inserta un marcador
ole_object.ActiveDocument.bookmarks.add("bookmark_name")
ole_object.ActiveDocument.Bookmarks.item("bookmark_name").Select
ole_object.Selection.typetext("Hola Mundo!")
// ir a la linea ...
// ole_object.selection.GoToNext(0)
//abre el cuadro de gramatica
//ole_object.ActiveDocument.CheckGrammar()
//abre el cuadro de Ortografia
//ole_object.ActiveDocument.CheckSpelling()
// Insertar texto en el marcador llamado Final
//GUARDAR EL DOCEMENTO ACTIVO COMO ...
//ole_object.ActiveDocument.SaveAs("C:\plantilla_word2.doc")
//ole_object.quit(0)
ole_object.disconnectobject( )
destroy ole_object
///*******************************************************************************
//ole_object.selection.Information[12]
//ole_object.selection.MoveLeft(1,5,1)
//ole_object.selection.TypeBackspace()
//ole_object.ActiveDocument.CheckSpelling()
//ole_object.Selection.Font.Italic = TRUE
//ole_object.Selection.Font.bold = TRUE
//ole_object.Selection.Font.Name = "Arial"
//ole_object.Selection.Font.Size = 24
//ole_object.Selection.Words[1].Italic = True
//ole_object.ActiveDocument.Paragraphs[1].Range.Font = "Arial"
//ole_object.selection.GoTo(TRUE,0,0,"state")
//ole_object.selection.GoToNext(3)
//ole_object.Selection.Find.Forward = True
//ole_object.Selection.ClearFormatting
//ole_object.Selection.MatchWholeWord = True
//ole_object.Selection.MatchCase = False
//ole_object.Selection.Wrap = wdFindContinue
//ole_object.Selection.Execute("PowerBuilder")
//
///*******************************************************************************
//i_handle = OpenChannel("Word","System")
//IF i_handle > 0 THEN
//messagebox('Atención','Word Pro Abierto',exclamation!)
//CloseChannel(i_handle)
//ELSE
// MESSAGEBOX("Titulo","NADA DE NADA")
//return 0
//END IF
//
ahi va eso
esto esta probado con PB 8 y word 2003
OLEObject ole_object
integer li_result, li_n,NbrRows
string ls_nombre , str
long i_handle
str = "New Text"
ole_object = CREATE OleObject
li_result = ole_object.ConnectToNewObject("word.application")
IF li_result <> 0 THEN
DESTROY ole_object
MessageBox("OLE Error", "No puede conectarse a Word " &
+ "Código: " &
+ String(li_result))
SetPointer(Arrow!)
RETURN
END IF
//Abrir el documento
ole_object.documents.open("C:\Prueba.doc")
ole_object.visible=true
//Para crear un documento nuevo basado en Normal.dot
//OLE_OBJECT.Documents.Add()
//Tamaño papel
//Tabloid=1, Letter=2, Legal=4, Executive=5,A3=6, A5=9, etc.
ole_object.ActiveDocument.pagesetup.Papersize= 7 // A4
//Orientación
ole_object.ActiveDocument.pagesetup.Orientation= 1 // Portrait
//Márgenes
ole_object.ActiveDocument.pagesetup.LeftMargin=ole_object.CentimetersToPoints( 2.5)
ole_object.ActiveDocument.pagesetup.RightMargin=ole_object.CentimetersToPoints( 2)
ole_object.ActiveDocument.pagesetup.TopMargin=ole_object.CentimetersToPoints( 2.5)
ole_object.ActiveDocument.pagesetup.BottomMargin=ole_object.CentimetersToPoints( 2)
//Insert algún texto en un nuevo párrafo
ole_object.Selection.Font.Name = "Verdana"
ole_object.Selection.Font.Bold = TRUE
ole_object.Selection.Font.Italic = TRUE
ole_object.Selection.Font.Underline = TRUE
ole_object.Selection.Font.Color =rgb(255,0,0)
ole_object.Selection.Font.Size = 16
ole_object.Selection.TypeParagraph()
ole_object.selection.ParagraphFormat.Alignment = 1
ole_object.Selection.TypeText( "TITULO" + '~r~n')
ole_object.Selection.Font.Size = 10
ole_object.selection.ParagraphFormat.Alignment = 2
ole_object.Selection.TypeText( 'Dia : ' + string(today() , 'yyyy/mm/dd?') + '~r~n')
ole_object.Selection.typetext("~n")
ole_object.selection.ParagraphFormat.Alignment = 3
ole_object.Selection.typetext("prueba")
ole_object.Selection.typetext("~n")
ole_object.Selection.TypeParagraph()
//Selecciona la parte indicada
//ole_object.selection.MoveLeft(1,8,1)
//ole_object.selection.TypeBackspace()
//ole_object.selection.goto(true,0,0,str)
// inserta un marcador
ole_object.ActiveDocument.bookmarks.add("bookmark_name")
ole_object.ActiveDocument.Bookmarks.item("bookmark_name").Select
ole_object.Selection.typetext("Hola Mundo!")
// ir a la linea ...
// ole_object.selection.GoToNext(0)
//abre el cuadro de gramatica
//ole_object.ActiveDocument.CheckGrammar()
//abre el cuadro de Ortografia
//ole_object.ActiveDocument.CheckSpelling()
// Insertar texto en el marcador llamado Final
//GUARDAR EL DOCEMENTO ACTIVO COMO ...
//ole_object.ActiveDocument.SaveAs("C:\plantilla_word2.doc")
//ole_object.quit(0)
ole_object.disconnectobject( )
destroy ole_object
///*******************************************************************************
//ole_object.selection.Information[12]
//ole_object.selection.MoveLeft(1,5,1)
//ole_object.selection.TypeBackspace()
//ole_object.ActiveDocument.CheckSpelling()
//ole_object.Selection.Font.Italic = TRUE
//ole_object.Selection.Font.bold = TRUE
//ole_object.Selection.Font.Name = "Arial"
//ole_object.Selection.Font.Size = 24
//ole_object.Selection.Words[1].Italic = True
//ole_object.ActiveDocument.Paragraphs[1].Range.Font = "Arial"
//ole_object.selection.GoTo(TRUE,0,0,"state")
//ole_object.selection.GoToNext(3)
//ole_object.Selection.Find.Forward = True
//ole_object.Selection.ClearFormatting
//ole_object.Selection.MatchWholeWord = True
//ole_object.Selection.MatchCase = False
//ole_object.Selection.Wrap = wdFindContinue
//ole_object.Selection.Execute("PowerBuilder")
//
///*******************************************************************************
//i_handle = OpenChannel("Word","System")
//IF i_handle > 0 THEN
//messagebox('Atención','Word Pro Abierto',exclamation!)
//CloseChannel(i_handle)
//ELSE
// MESSAGEBOX("Titulo","NADA DE NADA")
//return 0
//END IF
//
Etiquetas:
Desarrollo,
ole_object,
PowerBuilder,
Word
Suscribirse a:
Entradas (Atom)