Como Insertar una imagen como Header en WORD

Como Insertar una imagen como Header en WORD

Postby Blessed » Fri Sep 20, 2013 5:45 pm

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?
Oscar A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Blessed
 
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.

Re: Como Insertar una imagen como Header en WORD

Postby anserkk » Sat Sep 21, 2013 6:11 am

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
User avatar
anserkk
 
Posts: 1331
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests