Page 1 of 1

Como Insertar una imagen como Header en WORD

PostPosted: Fri Sep 20, 2013 5:45 pm
by Blessed
Hola a Todos:
Estoy trabajando en un agregado a una programa de un cliente.
Ellos tienen uns imagenes, que colocan como Header (Encabezado) en Word.
Ya creo y guardo datos en Word de la siguiente Manera.

Code: Select all  Expand view
oWord := TOleAuto():New("Word.Application")
oWord:Documents:Add() && Agregando un nuevo documento
oSelection := oWord:Selection  && Tomando la seleccion activa

WITH OBJECT oSelection
            :Font:Name="Times New Roman"
            :Font:Size=12
            :Font:Bold=.T.
            :Font:Underline=.T.
            :ParagraphFormat:Alignment = 1    && Centrar
            :TypeText(cTituloExa+CRLF)
END WITH

oWord:ActiveDocument:SaveAs( oApp:Ruta_WORD + "\" + MOVI->EXAMEN_NUM )
oWord:Quit()
 


Con esto resumo la ayuda que he recibido en el foro, como puedo insertar un Header?
Alguien lo ha Hecho?

Re: Como Insertar una imagen como Header en WORD

PostPosted: Sat Sep 21, 2013 6:11 am
by anserkk
Try this, I have not tested myself

Code: Select all  Expand view
LOCAL oHead  := oActiveDoc:Sections[1]:Headers[1]    // Header Section
LOCAL oRange := oHead:Range()
oRange:Collapse(1)       // Insert point at the beginning of the range
oRange:InlineShapes:AddPicture( "C:\Pictures\TestPic.JPG" )


Regards
Anser