I have put page number field to print on Page footer (or Report footer). Why
page number is not displayed on first page? Consider that I am not
programmer, Thanks!!!!
1. "Insert->Page Numbers" vs "Header and Footer->Insert Page Number" - Word VBA
2. Record Number vs page Number
> Hi. I have a crystal report that generates several pages
> per record returned. The report will give a differing
> number of pages for each record depending on certain
> conditions. What I need to do is find a way to
> programmatically determine which pages are associated with
> each record, and dump to a CSV.
>
> What I would like is something like:
> 1,1,6
> 2,7,10
> 3,11,12
>
> Where the first column is the record number, the second
> column is the starting page and the third column is the
> ending page.
>
Maybe you could try doing this in 3 separate formulas, then concatenating
the 3 formulas into one, giving you your format: 1,1,6.
Formula 1: Place in same section as the data to be counted.
RecordNumber
Formula 2: Place in the header of the group where the data to be counted is.
PageNumber
Formula 3: Place in same group's footer.
PageNumber
Formula 4: Concatenation. Place in same section as formula 3.
EvaluateAfter({@Formula3})
ToText({@Formula1}) + "," + ToText({@Formula2}) + "," ToText({@Formula3})
This will output the string "1,1,6" in the first group footer, "2,7,10" in
the second group footer, etc.
Hope that's what you're looking for.
KB
3. Adding Total Number of slides to the page number field in the footer - Visual Basic/VB
4. Page numbering starting from a number other than 1
5. auto date numbering instead of page numbering - Word VBA
6. Fetching text from specific page number and line number
The following should put the first line from each page into a separate
paragraph in a new document
Dim Counter As Long, Source As Document, Target As Document, lrange As Range
Set Source = ActiveDocument
Set Target = Documents.Add
Source.Activate
Selection.HomeKey Unit:=wdStory
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Counter = 0
While Counter < Pages
Counter = Counter + 1
Set lrange = Source.Bookmarks("\Page").Range
lrange.End = lrange.Start
lrange = lrange.Bookmarks("\line").Range
Target.Range.InsertAfter lrange & vbCr
Source.Bookmarks("\page").Range.Cut
Wend
Source.Close wdDoNotSaveChanges
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"san27geet" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
>I have word document from which I need to fetch text from 1st line of each
> page. I don't know how many pages I will have in the document. So my task
> is
> to
> - find number of pages in the word document. For this I used
> wrdApp.ActiveDocument.Content.Information(wdNumberOfPagesInDocument)
> - loop for the number of pages and on each page go to the 1st line and
> fetch
> the text. For this I am trying below code
> wrdApp.Selection.GoTo wdGoToPage,wdGoToAbsolute,pagenum
> wrdApp.Selection.GoTo wdGoToLine,wdGoToAbsolute, linenum
> wrdApp.Selection.EndOf wdParagraph,wdExtend
> Also I have below statements to make above code work
> Const wdGoToPage = 1
> Const wdGoToLine = 3
> Const wdGoToAbsolute = 1
> Const wdGoToRelative = 2
> Const wdLine = 5
> Const wdParagraph = 4
> Const wdExtend = 1
> Const wdActiveEndPageNumber = 3
> Const wdNumberOfPagesInDocument = 4
> Set wrdApp = CreateObject("Word.Application")
> Set wrdDoc = wrdApp.Documents.Open("C:\QTPScripts\Statement\stmt.doc")
> pagenum = 4
> linenum=1
>
> What is happening is that the text is fetched from page 2 line number 1. I
> am specifically stating to fetch text from page 4 and not from page 2.
> This
> is my 1st exposure to vbscript programming so please bear with my
> ignorance
> and lack of knowledge. Its been more than a week now and I need to
> proceed.
> Thanks in advance
7. TOC using paragraph numbers instead of Page numbers - Word VBA
8. page numbers using sections - how do you get physical page num