* Program....: LP.PRG * Version....: * Author.....: Peter A. Cortiel , mailto:pcortiel@earthlink.net * Date.......: 4/29/2003 * Notice.....: Copyright (c) 2003 ** PCS **, All Rights Reserved. * Compiler...: Visual FoxPro 08.00.0000.2521 for Windows for Windows * Abstract...: * Changes....: LPARAMETERS tcVCX as Character IF VARTYPE(tcVCX)="C" xx="modules\"+ALLTRIM(tcVCX)+".vcx" IF FILE(xx) USE (xx) && h:\vappsnew\vdmsacc\modules\vdmsacc.vcx ELSE xx=GETFILE() USE (xx) && h:\vappsnew\vdmsacc\modules\vdmsacc.vcx ENDIF ELSE xx=GETFILE() USE (xx) && h:\vappsnew\vdmsacc\modules\vdmsacc.vcx ENDIF #DEFINE LF CHR(13) #DEFINE wdHeaderFooterPrimary 1 #DEFINE wdGray25 16 #DEFINE wdAlignParagraphCenter 1 #DEFINE wdCollapseEnd 0 #DEFINE wdWord9TableBehavior 1 #DEFINE wdAutoFitContent 1 #DEFINE wdTableFormatList7 30 #DEFINE wdCellAlignVerticalCenter 1 #DEFINE wdStory 6 *lcFormName="s_note" lcFormName=INPUTBOX("FormName") LOCATE LOCATE FOR objname==lcFormName lcTxt=methods _cliptext=lcTxt lnPcount=OCCURS(lcTxt,"PROCEDURE ") USE LOCAL oWord as Word.Application oWord=CREATEOBJECT('Word.Application') oDocument=oWord.Documents.Add('normal.dot') oWord.Visible=.t. _cliptext=lcFormName+LF+LF * Add a header WITH oDocument.Sections[1].Headers[ 1 ] oRange = .Range() WITH oRange .Text = lcFormName+LF+LF .Style = oDocument.Styles["Heading 3"] .ParagraphFormat.Alignment = wdAlignParagraphCenter .Shading.BackgroundPatternColorIndex = wdGray25 ENDWITH ENDWITH _cliptext=lcTxt oword.ActiveDocument.Range.Paste *oword.Selection.HomeKey(wdStory)Peter