Removing a SAVEDATE Variable

S

Stefan_B

Hello,

I have a SAVEDATE variable in an Microsoft Word document header, can I
remove the SAVEDATE field code via (Word) VBA.

I'm currently using Microsoft Windows 2000, with Office 2000.

Any help would be appreciated.

Thanks.
Stefan_B.
 
G

Greg

Something like:

Sub DeleteFieldsInHeader()
Dim oFld As Field
Dim rngStory As Word.Range
Set rngStory = ActiveDocument.StoryRanges(wdPrimaryHeaderStory)
For Each oFld In rngStory.Fields
If oFld.Type = wdFieldSaveDate Then
oFld.Delete
End If
Next
Set rngStory = Nothing
End Sub
 
S

Stefan_B

Thanks for your reply. However I was wondering, whether I could ask one more
question. I have a text box which is hidden in a header and footer, which
also contains a SAVEDATE variable. I have attempted to use the '
 
S

Stefan_B

Sorry, what I was trying to say was I have also attempted to use
wdTextframestory, without any sucess. I was wondering, if anyone had any
ideas.
 

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