Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert manual page breaks
Message
De
15/01/2010 06:40:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01444106
Message ID:
01444125
Vues:
42
>I am creating a document from a text file and would like to insert a manual page break (^m) after the word 'page' in the document m.txt
>the word "page" occurs about 30 times in the text file. i staggered a guess: STRTOFILE(CHRTRAN(FILETOSTR("M.txt"),"PAGE","^M PAGE"),"M.txt")') and it doesn't work. Does anyone have something else i can try?
>thanks
>k
>
>
>#DEFINE wdToggle 9999998
>LOCAL loWord, loSelection, loDocument
>loWord = CREATEOBJECT("Word.Application")
>loWord.Visible = .T.
>loDocument = loWord.Documents.Add()
>loSelection = loWord.Selection
>loSelection.Font.Name= "lucida console"
>loSelection.Font.Size= "9"
>=STRTOFILE(CHRTRAN(FILETOSTR("M.txt"),CHR(26),''),"M.txt")')
>=STRTOFILE(CHRTRAN(FILETOSTR("M.txt"),"PAGE","^M PAGE"),"M.txt")') && doesn't work
>loSelection.TypeText(FILETOSTR("M.txt") )
>
The codes are for Word's internal use; Naomi already gave you a reply, but if you don't know the command, the correct thing to do here, I believe, is to save a macro in Word, give the command (in this case, insert a page break), and then try to adapt the macro.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform