Professional Web Applications Themes

Problem with writing ms-word hheader through ASP.NET(VB.NET) - ASP.NET General

Hi, I have to generate a word or rtf file on the fly whould have a Header and footer both but i m not able to include the header and footer in the doent can anyone suggest me how can i do that. Currrently i am having a template of word doent which has a header ad footer and in that i m having tags which i m replacing with my data.But when i m genrating the doent its not including the header and footer in the doent.How can i do that. Any suggestion or example given willl be highly ...

  1. #1

    Default Problem with writing ms-word hheader through ASP.NET(VB.NET)

    Hi,

    I have to generate a word or rtf file on the fly whould
    have a Header and footer both but i m not able to include
    the header and footer in the doent can anyone suggest
    me how can i do that.
    Currrently i am having a template of word doent which
    has a header ad footer and in that i m having tags which i
    m replacing with my data.But when i m genrating the
    doent its not including the header and footer in the
    doent.How can i do that.
    Any suggestion or example given willl be highly
    appreicated.

    thaanks
    vijay
    Vijay Guest

  2. #2

    Default Re: Problem with writing ms-word hheader through ASP.NET(VB.NET)

    Vijay,

    I've done this using bookmarks, the code below is written using VB6 but the
    references to the Ms-Word object should work in dotnet as well !!

    Hope this helps

    Jurjen de Groot,
    G.I.T.S. Netherlands.


    Dim objWord as Object
    Set objWord = new Word.Application

    // set seekview to PageHeader
    objWord.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

    // Find your bookmarks in the header/footer here and insert text accordingly
    objWord.ActiveDoent.Bookmarks("HeaderClientName ").Select
    objWord.Selection.TypeText Text:="ClientName"

    // set seekview to Main Doent
    objWord.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDoent

    // Find your bookmarks in the main doent and insert text accordingly
    objWord.ActiveDoent.Bookmarks("MainClientName") .Select
    objWord.Selection.TypeText Text:="ClientName"



    "Vijay" <vijayhealthnettech.com> wrote in message
    news:0d4901c34543$ad9a1eb0$a301280aphx.gbl...
    > Hi,
    >
    > I have to generate a word or rtf file on the fly whould
    > have a Header and footer both but i m not able to include
    > the header and footer in the doent can anyone suggest
    > me how can i do that.
    > Currrently i am having a template of word doent which
    > has a header ad footer and in that i m having tags which i
    > m replacing with my data.But when i m genrating the
    > doent its not including the header and footer in the
    > doent.How can i do that.
    > Any suggestion or example given willl be highly
    > appreicated.
    >
    > thaanks
    > vijay

    Jurjen de Groot Guest

Similar Threads

  1. Writing Word with CFContent
    By stephenhardesty in forum Coldfusion - Advanced Techniques
    Replies: 5
    Last Post: June 2nd, 03:25 AM
  2. Writing a pdf from word using acrobat 4 vs 6 - Missing Graphics
    By s_raynes@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: May 11th, 04:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139