please ignore my previous question and help me

  • Thread starter hemaneelagiri via OfficeKB.com
  • Start date
H

hemaneelagiri via OfficeKB.com

please ignore my prvious question with lot of replies

first i explain how my document looks.

i am displying meeting details..

right now my document is having 3 pages

in first page meeting header means.. date time, particpants, location etc...
in 2nd page agenda details, where i can have many agendas so those agendas
are comeing in loop so those will display one by one..(2nd page data is in
loop)

and third page meeting sumamry

and when i pass value(meetingno) to worddocument from my c# aplication

first of all the document page numbers should start given number which i get
in macro from DB(ex: 20)
and when 2nd page data is itterating that time i want to save that agendas
pagenumber in DB for that agenda

for this first i have to set the pagenumbers with new serial number. but when
2nd page data is displying that page number is coming as new page not in
serail

b'coz i am setting pagenumbers in header it self, so first 3 static pages
pagenumbers are coming in searil(means 20,21,22). and when the datat is
coming in loop means when new page is inserting that time it is taking as new
docmunt page(i.e: 21) for each itterating not taking 23,24..
'b'coz i am setting pagenumbers in header,

if i set pagenumbers at last after generating the whole data.. then the page
numbers are coming properly..
but how can i know.. which page number is for which agenda(which is in loop)..
this is also important to me(i want to save this page number for that agenda)

hope fully u understand my problem..


how can i delete my own posting which are not clear
 
D

Doug Robbins - Word MVP

Please slow down and provide a more precise version of what you are doing.
Your present description is all gobbledegook to me.

--
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, originally posted via msnews.microsoft.com
 
H

hemaneelagiri via OfficeKB.com

ok i will try to explain my level best

i want to give my own start page number(in page header) to document that
start number and data comes from macro

in documnet i have fields with book marks.. so with that book marks i am
retriving data from macro

when i am retriving data some data is coming in loop , for that loop i am
doing like this

For intX = 0 To mrst.RecordCount - 1
If intX > 0 Then
Selection.GoTo What:=wdGoToSection, Which:=wdGoToLast
Selection.MoveUp Unit:=wdLine, Count:=1

Selection.InsertBreak Type:=wdSectionBreakContinuous


Selection.InsertFile Filename:=mstrTemplatePath, Range:="mtaLoop",
ConfirmConversions:=False, Link:=False, Attachment:=False

For Each frmfld In ActiveDocument.FormFields
Select Case frmfld.Name
Case "mta070" 'ID
frmfld.Select
Selection.TypeText mrst!ID
Case "mta072" 'AutoNo
frmfld.Select
Selection.TypeText "AutoNo:" & vbTab & mrst!AMAutoNo
Case "mta061", "mta037" 'AutoNo
frmfld.Select
Selection.TypeText mrst!AutoNo
End Select
Next frmfld

mrst.MoveNext
Next intX


i don't how many extra pages will come, these whole will come dynamically
so when i set my own start at page numbers in macro starts

iProtocolSerialNo = mobjClsQueries.GetProtocolSerialNumber(mintRecord_Id)

With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary)
If .PageNumbers.StartingNumber = 0 Then
.PageNumbers.RestartNumberingAtSection = True
.PageNumbers.StartingNumber = Val(iProtocolSerialNo + 1)
End If
End With


page numbres are coming according new number but only for static pages..
means if documnt template has 3 pages so first three pages comes correctly..
and after that if there are extra pages from looping those page numbers are
diplyaing each number as PageNumbers.StartingNumber +1

if i set this page numbers in last before displaying document.. then
pagenumbers are coming properly.


this data is coming properly but when i get pagenumber with
Selection.Information (wdActiveEndPageNumber) this very first page(intX=0)
number is displying 1 means.. that is second page fine but when intX is > 0
then it is displaying 4 b'coz original 3 pages and this is the next page so
it is coming as 4 but in out put document this comes at 3rd page


but here one more problem is there
i want to save mta070" 'ID and that pagenumber(new number) in db

so how can i give pagenumbers dynamically like with bookmark are any another
way.. and while printing loop data can i get page number

hope and wish u understood my problem
please help me





Please slow down and provide a more precise version of what you are doing.
Your present description is all gobbledegook to me.
please ignore my prvious question with lot of replies
[quoted text clipped - 43 lines]
how can i delete my own posting which are not clear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top