Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page Number | Page Layout | |||
Page Number and Page header on the first page | Formatting Long Documents | |||
When insert page number is clicked, the number inserted at page 1. | Page Layout | |||
Go To Page function obligates you to delete previous entry | Microsoft Word Help | |||
FIrst page footers | Microsoft Word Help |