Hey all!
I have been using OLE to happily generate lots and lots of word docs based on other word docs (which I will call demplates). It’s been going well… However, I find that when I look at my finsihed product, the even and odd footers that were painstakingly placed into my demplates go missing.
If I “manually” turn back on the property for “Even and Odd” headers and footers in my MS Word Page Setup menu, they re-appear… But the problem is that this Page Setup attribute does not carry over from my demplate.
Hey, no problem, I’ll just set it programmatically? Easier said than done my friends… There is a property for it, but I cannot set it to save my life.
Sample:
oleobject.Application.ActiveDocument.PageSetup.OddAndEvenPagesHeaderFooter = True
I was reading the notes.net posts and came accross that in some cases with Excel (I think) you have use the right type of view, which apparently is view no. 3. I’ve tried setting this just before the previous property, and no such luck.
Sample:
If oleobject.Application.ActiveWindow.ActivePane.View.Type = 1 Or oleobject.Application.ActiveWindow.ActivePane.View.Type = 2 Then
oleobject.Application.ActiveWindow.ActivePane.View.Type = 3
End If
So, I sure do hope someone can help me out here… I’m not sure what to do next!!! Thanks for reading!