save document loses headers and footers

N

Nathan Franklin

hello,

i am trying to call SaveAs to save my document to file...

i use this code
Doc.SaveAs(Application.StartupPath() & "\Reports\" & ReportID & ".doc",
FileFormat:=Word.WdSaveFormat.wdFormatDocument, LockComments:=False,
Password:="", AddToRecentFiles:=True, WritePassword:="",
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False,
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:=False)

my problem is, it doesnt save the headers and footers of the pages.... I
have no idea why, but if I do it manually it will save them fine...

The code above it code i got from the word macro recorder, which i recorded
when is aved the file manually....

Could someone please point me in the right direction.



thanks very much

nathan
 
N

Nathan Franklin

maybe it is only working when the word document is visible??

this looks like the case from further tests

why would this be?
 

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