FUNCTION MAIN()
LOCAL oWord := CREATEOBJECT( "Word.Application" )
LOCAL oDoc := oWord:Documents:Add()
LOCAL oSel
oDoc:Range:InsertAfter( "<toreplace>" + CHR( 13 ) )
oDoc:Select()
oSel = oWord:Selection
WORDREPLACE( oSel, "<toreplace>", "Giordano Enrico Maria" )
oWord:Visible = .T.
RETURN NIL
FUNCTION WORDREPLACE( oSel, cSrc, cRpl )
oSel:Start = 0
oSel:End = -1
oSel:Find:Execute( cSrc )
oSel:Range:Text = cRpl
RETURN NIL
FUNCTION MAIN()
LOCAL oWord := CREATEOBJECT( "Word.Application" )
LOCAL oDoc := oWord:Documents:Open( "E:\XHARBOUR\TEST.DOC" )
oDoc:PrintOut( .F. )
oDoc:Close( 0 )
oWord:Quit()
RETURN NIL
Ollie wrote:2. And on the subject of merging with Word, how would you get it to replicate the document for each record in the Database
Ollie wrote:You are a man of few words.
Ollie wrote:Is your response related to the Email part of my question or my "replicate" letter part of the email?
Ollie wrote:As I've said I need to 1. Create an email template and 2. Send an email to the database using this template. (Using Office together with my software to achieve this is fine)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 74 guests