[mso] Re: delete header in text file & save with the same name
- From: Cathy.Evans@xxxxxxxxx
- To: mso@xxxxxxxxxxxxx
- Date: Fri, 22 Oct 2004 08:13:53 -0400
Found this at below link, you would need to replace wdSeekCurrentPageHeader
with wdSeekCurrentPageFooter, plus the bottom portion gives a replacement
for what's being deleted. You may want to either adjust or remove the
replacement portion. Not sure the entirety of what you're needing but this
may get you started and you can adjust from there.
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.LanguageID = wdEnglishAUS
NormalTemplate.AutoTextEntries("Filename and path").Insert Where:= _
Selection.Range, RichText:=True
Selection.TypeParagraph
NormalTemplate.AutoTextEntries("Page X of Y").Insert Where:=Selection.
_
Range, RichText:=True
Selection.TypeText Text:=vbTab & "Issue Date: "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldDate
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
http://www.utteraccess.com/forums/showflat.php?Cat=&Board=10&Number=551469&page=1&view=collapsed&sb=5&o=&fpart=1
"Susanto, Alex"
<alsusanto@solectro To: mso@xxxxxxxxxxxxx
n.com>
Sent by: cc:
mso-bounce@freelist
s.org Subject: [mso] delete header in
text file & save with
10/21/2004 11:38 PM the same name
Please respond to
mso
.....
Hi,
I have a lot of text files (report) that always give me problem to delete
the headers.
Is it any vba to automated delete the headers & save in text file again.
The headers such as below where the date, page nos is always diff each
page.
Thx for your help & rgds/alex
USD 170 Site Segment Values Listing
Report Date: 19-OCT-2004 23:42
Segment: CO_DIV
Page: 1 of 3
Start End
Rollup Posting Budgeting
CO_DIV Description Date Date
Enabled Parent Group Allowed Allowed
-----------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain proprietary,
business-confidential and/or privileged material.
If you are not the intended recipient of this message you
are hereby notified that any use, review, retransmission,
dissemination, distribution, reproduction or any action taken
in reliance upon this message is prohibited. If you received
this in error, please contact the sender and delete the
material from any computer. Any views expressed in this message
are those of the individual sender and may not necessarily reflect
the views of the company.
-------------------------------------------------------------------------------------------------------
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in
the subject line.
Or, visit the group's homepage and use the dropdown menu. This will also allow
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
Other related posts: