Delete tables in the page footer

S

Senad Isanovic

I have two tables in the page footer and want to delete one of these,
depending on what optionbox in the form is selected
This code is not working so I need something similar.?

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.GoTo What:=wdGoToBookmark, Name:="bSidfStrategic"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.Tables(2).Select
Selection.Tables(2).Select
Selection.Tables(2).Delete
Selection.Delete Unit:=wdCharacter, Count:=1
 
H

Helmut Weber

Hi Senad,

not much use in recording something like that.

Have a look at this example:

With ActiveDocument.Sections(1).Headers
(wdHeaderFooterPrimary).Range.Tables(1).Delete
End With

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 

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