none
read line 1 and 2 at footer word RRS feed

Answers

  • Hi Van2010,

    I didn't see what language you're using but in VB the command looks like this:

       wdoc.Selection.MoveRight(Unit:=wdLine, Count:=1, Extend:=wdExtend)

    Unit values for a line = 5, paragraph = 4, or a single word = 2. The extend value = 1

    To get into the footer and use a command as above looks like this:

    wdoc.ActiveDocument.Sections(1).Footers(Microsoft.Office.Interop.Word.

     

    WdHeaderFooterIndex

    .wdHeaderFooterPrimary).Range.Select()

    wdoc.Selection.Collapse(Direction:=wdcollapseStart)

    wdoc.Selection.MoveRight(Unit:=wdLine, Count:=1, Extend:=wdExtend)

    Hope this helps


    Regards
    Thursday, April 7, 2011 12:29 PM

All replies

  • eg there are three words in the footer word

    ABC DEF GHI

    then I just wanted to take the words ABC and GHI, and when I enter a "123" to foote ,
    then the footer text become ABC GHI 123
    Thursday, April 7, 2011 3:25 AM
  • that's an extremely broad question that will probably need to be clarified, but you can just read in characters until you encounter a new line, and then repeat that once.

    Thursday, April 7, 2011 6:04 AM
  • Hi Van2010,

    I didn't see what language you're using but in VB the command looks like this:

       wdoc.Selection.MoveRight(Unit:=wdLine, Count:=1, Extend:=wdExtend)

    Unit values for a line = 5, paragraph = 4, or a single word = 2. The extend value = 1

    To get into the footer and use a command as above looks like this:

    wdoc.ActiveDocument.Sections(1).Footers(Microsoft.Office.Interop.Word.

     

    WdHeaderFooterIndex

    .wdHeaderFooterPrimary).Range.Select()

    wdoc.Selection.Collapse(Direction:=wdcollapseStart)

    wdoc.Selection.MoveRight(Unit:=wdLine, Count:=1, Extend:=wdExtend)

    Hope this helps


    Regards
    Thursday, April 7, 2011 12:29 PM