Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Word doc without opening it

Status
Not open for further replies.

kutibo

MIS
Dec 19, 2000
22
US
Does anyone know how to remove the header and footer from a Word document without opening it?
 
I'm pretty sure you have to open it, but you can open it as 'hidden' if you want.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' OPEN MS WORD
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public WordApp As New Word.Application
Public Doc As Word.Document
'
Public Sub OpenWord(vOpt)
WordApp.Documents.Open App.Path + "\POText.doc"
WordApp.Visible = False
Set Doc = WordApp.ActiveDocument
End Sub

(insert delete code)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' CLOSE MS WORD
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Sub CloseWord()
WordApp.ActiveDocument.Close (wdDoNotSaveChanges)
WordApp.Quit
Set Doc = Nothing
Set WordApp = Nothing
End Sub -----
The death of dogma is the birth of reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top