word.application object in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sajithamol

    word.application object in vb.net

    how to set header and footer to a word file created by word .application object in VB.net.
  • santuvssantu
    New Member
    • Jun 2007
    • 12

    #2
    Originally posted by sajithamol
    how to set header and footer to a word file created by word .application object in VB.net.
    Hi,
    Dim m_WordDoc As Word.Document

    m_WordDoc.Activ eWindow.ActiveP ane.View.SeekVi ew = Word.WdSeekView .wdSeekCurrentP ageHeader
    m_WordDoc.Appli cation.Selectio n.TypeText(Text :="Test Header")
    m_WordDoc.Activ eWindow.View.Se ekView = Word.WdSeekView .wdSeekMainDocu ment

    The same way you can put your own footer by changing wdSeekCurrentPa geFooter.....

    Hope this helps.....

    Thanks

    Comment

    Working...