Reply
 
Thread Tools Display Modes
  #1   Report Post  
Leila
 
Posts: n/a
Default Delete first page number

Hi there,
Would you please let me know what I'm dong wrong in this code?
I want to delete "Page {PAGE}" in the first page header if different First
page option is checked off. Any help would be appreciated!
-------------------------
Sub Delete1stPgNo()

Dim oField As Field
If ActiveDocument.PageSetup.DifferentFirstPageHeaderF ooter = True Then

ActiveDocument.ActiveWindow.ActivePane.View.SeekVi ew =
wdSeekFirstPageHeader
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Page"
.Replacement.Text = ""
End With
With Selection.Range.Fields
If oField.Type = wdFieldPage Then
oField.Delete

End If
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If

End Sub
  #2   Report Post  
Charles Kenyon
 
Posts: n/a
Default

Please do not post the same question in multiple newsgroups as separate
messages.
"Leila" wrote in message
...
Hi there,
Would you please let me know what I'm dong wrong in this code?
I want to delete "Page {PAGE}" in the first page header if different First
page option is checked off. Any help would be appreciated!
-------------------------
Sub Delete1stPgNo()

Dim oField As Field
If ActiveDocument.PageSetup.DifferentFirstPageHeaderF ooter = True Then

ActiveDocument.ActiveWindow.ActivePane.View.SeekVi ew =
wdSeekFirstPageHeader
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Page"
.Replacement.Text = ""
End With
With Selection.Range.Fields
If oField.Type = wdFieldPage Then
oField.Delete

End If
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If

End Sub



  #3   Report Post  
Leila
 
Posts: n/a
Default

Sorry, but I didnt want to. it was already gone when I found out that I sent
my question to the wrong group

"Charles Kenyon" wrote:

Please do not post the same question in multiple newsgroups as separate
messages.
"Leila" wrote in message
...
Hi there,
Would you please let me know what I'm dong wrong in this code?
I want to delete "Page {PAGE}" in the first page header if different First
page option is checked off. Any help would be appreciated!
-------------------------
Sub Delete1stPgNo()

Dim oField As Field
If ActiveDocument.PageSetup.DifferentFirstPageHeaderF ooter = True Then

ActiveDocument.ActiveWindow.ActivePane.View.SeekVi ew =
wdSeekFirstPageHeader
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Page"
.Replacement.Text = ""
End With
With Selection.Range.Fields
If oField.Type = wdFieldPage Then
oField.Delete

End If
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If

End Sub




  #4   Report Post  
Bear
 
Posts: n/a
Default

So what if a question is repeated in multiple newsgroups. There is the
chance that different people with different knowledge read only one or the
other. Don't be so small.

Bear

"Charles Kenyon" wrote:

Please do not post the same question in multiple newsgroups as separate
messages.
"Leila" wrote in message
...
Hi there,
Would you please let me know what I'm dong wrong in this code?
I want to delete "Page {PAGE}" in the first page header if different First
page option is checked off. Any help would be appreciated!
-------------------------
Sub Delete1stPgNo()

Dim oField As Field
If ActiveDocument.PageSetup.DifferentFirstPageHeaderF ooter = True Then

ActiveDocument.ActiveWindow.ActivePane.View.SeekVi ew =
wdSeekFirstPageHeader
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Page"
.Replacement.Text = ""
End With
With Selection.Range.Fields
If oField.Type = wdFieldPage Then
oField.Delete

End If
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If

End Sub




  #5   Report Post  
Bear
 
Posts: n/a
Default

Leila,

I see no need to explain or apologize for yourself. You posting on more
than one group is certainly understandable and makes much more sense than
Kenyon's unresponsive remark.

Sorry I can't help with the code.

Bear

"Leila" wrote:

Sorry, but I didnt want to. it was already gone when I found out that I sent
my question to the wrong group

"Charles Kenyon" wrote:

Please do not post the same question in multiple newsgroups as separate
messages.
"Leila" wrote in message
...
Hi there,
Would you please let me know what I'm dong wrong in this code?
I want to delete "Page {PAGE}" in the first page header if different First
page option is checked off. Any help would be appreciated!
-------------------------
Sub Delete1stPgNo()

Dim oField As Field
If ActiveDocument.PageSetup.DifferentFirstPageHeaderF ooter = True Then

ActiveDocument.ActiveWindow.ActivePane.View.SeekVi ew =
wdSeekFirstPageHeader
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Page"
.Replacement.Text = ""
End With
With Selection.Range.Fields
If oField.Type = wdFieldPage Then
oField.Delete

End If
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End If

End Sub




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Number funnybroad Page Layout 4 March 3rd 05 07:58 AM
Page Number and Page header on the first page Frank Drost Formatting Long Documents 3 March 1st 05 02:17 PM
When insert page number is clicked, the number inserted at page 1. inbetween Page Layout 1 February 19th 05 07:07 AM
Go To Page function obligates you to delete previous entry Kamran Microsoft Word Help 3 February 3rd 05 06:17 PM
FIrst page footers Noel S Pamfree Microsoft Word Help 7 December 6th 04 08:49 PM


All times are GMT +1. The time now is 03:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"