Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Formatting Text into Word Document
#1
I have 100 files in a directory that I want to format into a word document to print.

I want to grab the name of each file and the contents of the files

The filename needs to be bold, then the contents of the file under that.
After the contents, I want a page break inserted.

I want the font to be 10pt Consolas.

The pages are going to be set up for "Book fold" with "All" sheets per booklet.
The orientation is "Landscape"
The margins are as follows:
Top:0.3"
Bottom:0.3"
Inside:0.3"
Outside:0.3"
Gutter:0.7"
#2
I see 2 ways.

1. Use keys.

without font:
Macro Macro2815
Code:
Copy      Help
act "Word"
spe 10
Dir d
foreach(d "$My QM$\*.txt" FE_Dir)
,str path=d.FullPath
,out path
,str data.getfile(d.FullPath);; err ...
,
,key Cb (d.FileName) Y Cb
,paste data
,key CY

2. Try Word COM.
#3
I`m also used first way, it is very convenient


Forum Jump:


Users browsing this thread: 1 Guest(s)