print current section page line numbers in 2nd Word doc

D

DJY

Please help! Now that I can print the current section,
page, and line number from a Word document into message
boxes, how can I print that information into a separate
Word document using a Word macro?

Thanks in advance,
DJY
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < DJY > écrivait :
In this message, < DJY > wrote:

|| Please help! Now that I can print the current section,
|| page, and line number from a Word document into message
|| boxes, how can I print that information into a separate
|| Word document using a Word macro?
||

Use something likje:

'_______________________________________
Dim MyNewDoc As Document

Set MyNewDoc = Documents.Add

With MyNewDoc
.Range.Text = "Your Information"
.PrintOut
.Close wdDoNotSaveChanges
End With
'or
With MyNewDoc
.SaveAs "C:\My Documents\NewDocument.doc"
.Close
End With
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top