Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How Can I Select ONE Page Of A Multi-page Word OLE Document?


Hello,

I have the following code that works just fine as long as I have a Single-page word document loaded. However, I need to Select EACH page individually and rasterize into a TIF image. You will note that I am able to Find Text and Select the Entire Line. I can also Select the ENTIRE document using the "OLE1.object.Content.Select" method. But I just can't seem to figure out how to select a Single Page!!!


Once I use the ".Copy" method I AM able to "Paste" it into my Imaging Viewer (Pegasus ImagXpress) object. It is critical that I save these pages individually. Here is the code I'm using for this:
Code:
Private Sub Command3_Click()

    OLE1.DisplayType = 0 ' Display object in the control
    

    OLE1.CreateEmbed "C:Merged.doc", "Word.Document"
    
    OLE1.DoVerb vbOLEActivateGetFocus
    OLE1.SizeMode = vbOLESizeStretch
     
    'Find Text
    With Selection.Find
        .ClearFormatting
        .MatchWholeWord = True
        .MatchCase = False
        .Forward = True
        For i = 1 To 10
            .Execute FindText:="Client Account #:"
            DoEvents
            If .Found Then
                With Selection
                    .EndOf unit:=wdLine, Extend:=wdSelStartActive
                    ' Copy the selection to the Clipboard
                    .Copy
                    ' Paste the entire selection into the Text1 form field
                    Text1.Text = Trim(Clipboard.GetText)
                    ' Break out the Account # and paste it into the Text2 field
                    Text2.Text = Right(Text1.Text, Len(Text1.Text) - InStrRev(Text1.Text, ":"))
                End With
            End If
            DoEvents
        
            'Select the entire document
            OLE1.object.Content.Select
            
            With Selection
                .StartOf unit:=wdGoToAbsolute extend:=wdline
                'Copy selection to clipboard
                .CopyAsPicture
            End With
            DoEvents
          
            Form2.ImagXpress1.Paste
            MsgBox Form2.ImagXpress1.ImagError ' Shows Zero if No Error
            Form2.ImagXpress1.Refresh

            Form2.Show
            
            DoEvents
            'Goto next page
            Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext
        Next
    End With
     
' OLE1.Close
    
End Sub

Thanks,
Jacob



Edited by - JacobRusso on 11/18/2003 5:05:10 PM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Word - Loop Through Each Page In Document And Copy Page With Page Format
Here's what i'm trying to accomplish

1 - Start at first page and get page format (portrait/landscape)

2 - Copy page and paste it into a new word document with original format

repeat these steps until all pages have been copied

I need the condition where a document has both portrait and landscape pages.

Anyhelp would be appreciated

Adding New Page To Word Document.
Hi everyone,

How do you add new page (not new document) into the word document?

For example, in the ASP page, i have 5 tables dynamically generated.

Then i invoke a client side script, each table in the HTML page will be added to a new page of the word document.

How should I go about doing that?

Please advise. Thanks

Deleting A Page In A Word Document
Ive set up a word object using the word.application obect and have a number of table spread across several pages. What i'd like to do is delete one of the pages or not display it under certain circumstances.

I'd of thought there would be something along the lines of:

newdoc.activedocument.page(index).delete

but there isnt. Any ideas on how you can delete pages?

Trying To Put In A Page Break In A Word Document
Hey guys,

My VB6 code opens a WOrd Document and generates a table in it. What I need to know is that after a certain number of cells I want to skip to the next page even the though the page has not ended. Is there way I can put in a page break after a certain number of cells have been filled up in the table. Also is there way I can tell if the page is about to end i.e. only one line is left on the page or something along those lines.

Thanks, any kind of help will be appreciated.

moy021

How To Add Shapes Past 1st Page Of Word Document?
I am automating MS-Word 2000 with VB6 (SP5) using the Word 9.0 object library. I can successfully add text to create a multiple page document. However, I can only add images to page 1. How can I set the image anchor to any page in the active document?

Let's say my document already contains 3 pages, and I want to add the same image (at the same location) to each of the pages.

If one was to loop through the following, i.e.:

ShapeIndex = ShapeIndex + 1
oDoc.Shapes.AddPicture "c:Test.bmp"
oDoc.Shapes(ShapeIndex).Top = InchesToPoints(0.7)
oDoc.Shapes(ShapeIndex).Left = InchesToPoints(1.4)

three images (on top of each other) would be added to page 1, which is not the desired result.

The Microsoft Word speaks of an 'anchor' argument as part of the .AddPicture method, but there is no example on how to implement this option.

Can anyone help me out?

Thanks in advance.

Word Document Is Withen Page Margins
I am using automation to print word files. However, some file are outside the page margins. When thoes file are printed a message box appears that it is ouside the page margin.
I discovered that if the Word application is hidden
Code:
wApp.DisplayAlerts = wdAlertsNone
doesn't work. Only when the Word document is visible it seems to disable all messages. Unless a Word doc is outside the page margins, I want Word to be hidden. How do I test to see if the Word Document is outside the Page Margins?

Thank You

Inserting Page Break In Word Document From VB
Hii All,


I am having a problem in inserting page break into a word document from vb.basically i am trying to create a report in word from vb.

First i am putting my code:

set rs1="select * from tablename"



if not rs1.eof then

Set wrdapp = New Word.Application
Set wrddoc = wrdapp.Documents.Add
wrddoc.Select
Set wrdSelection = wrdapp.Selection


do while not rs1.eof

//my aim is to put details of each record in one page

If wrdapp.ActiveWindow.ActivePane.View.Type = wdNormalView Or wrdapp.ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
wrdapp.ActiveWindow.ActivePane.View.Type = wdPrintView
End If
wrdapp.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
wrdapp.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

///picture is inserted
wrdapp.Selection.InlineShapes.AddPicture FileName:="C:cesclogo.jpg", LinkToFile:=False, SaveWithDocument:=True

wrdapp.Selection.TypeText rs1.fields(0).......fields(n)

wrdapp.Selection.InsertBreak Type:=wdPageBreak

//with the above code i am getting my desired output
//ie the picture and the field values are getting printed properly in //each new page.

//Now the problem is i want to put the recordset field values in
//tables for this i have added the followng code.



wrdapp.Selection.Tables.Add wrdapp.Selection.Range, NumRows:=1, NumColumns:=3

With wrdapp.Selection.Tables(1)

.Cell(1, 1).Range.InsertAfter "STOCK REVIEW REPORT"
.Cell(1, 2).Range.InsertAfter "A.Bhowmick R.K Ghosh"
.Cell(1, 3).Range.InsertAfter rs1.fields(0) etc. etc.
End With

//ie i am not going to write this portion of code

// wrdapp.Selection.TypeText rs1.fields(0).......fields(n)

//instead i want to display contents of recordset in word table.

//now by inserting a table whatz happening is that if my recordset returns 3 rows a picture is getting inserted at the top of each page but all 3 tables along with their contents is appearing in the last page .i want each table to appear in each page along with the image.i hav no idea whats happing here.



rs1.movenext
loop

wrdapp.Visible = True

end if



i guess i have explained my problem.i am dying to have a proper solution as early as possible.Thus any help will be gr8ly appreciated.


regards
Arnab Sengupta

Start With Different Page Number In Word Document
Hi,

I have a document within which there is a macro that fetches images (TIF Format) from a server and stores it locally on temp (c: emp). On pressing F11 on the document it compares the TIF filename from temp to the filename stored in the DB. If both the names match then the image is pasted or displayed on a new document, which is automatically created.
For each image displayed there is a corresponding title for it, which is captured from the DB and displayed in the Header. Simultaneously page numbers need to be displayed on the footer for the images.
A particular header can have more than one image. Once the header differs there is New Section Break, but the page number needs to continue. To add to that the user can add a different page number from the front end (a VB app) that is stored in the DB.

Issue is I can either get different headers to be displayed (based on the section break) or the page number to be displayed correctly (based on the page number entered from the VB App). I need both of them to be displayed in order to roll out this particular module.

Please Help !!!

Find below the code:
-------------------------------------------------------
Sub PictureMacro()
    
    Dim oCn1 As ADODB.Connection
    Dim oRs1 As ADODB.Recordset, oRs2 As ADODB.Recordset, oRs3 As ADODB.Recordset, oRs4 As ADODB.Recordset, oRs5 As ADODB.Recordset, oRs6 As ADODB.Recordset, oRs7 As ADODB.Recordset
    Dim Directory As String, FType As String, FName As String
    Dim connection1 As String, sSQLStmt1 As String, sSQLStmt2 As String, sSQLStmt3 As String, sSQLStmt4 As String, sSQLStmt5 As String, sSQLStmt6 As String, sFilename As String
    Dim sDocket_Desc As String, Sub_Number As String, sSplit As String, sCurPage As String
    Dim rng As Range, oRange As Range
    Dim position As Integer, J As Integer, StartPage As Integer, Sub_Count As Integer
    Dim v_start_page As Integer, v_end_page As Integer, v_tot_pages As Integer, CurPage As Integer
    Dim Docid As Variant, Pageno As Variant, v_secid As Variant
    Dim Docket_Desc As Variant, v_tmp As Variant, SecPages As Variant, temp_secid As Variant
    Dim TifName() As Variant
    Const DotPath As String = "\apsrv46hSaberAppealsPackageClerksPaper.dot"
    
    'Connecting to DB
            connection1 = "Provider=MSDAORA.1;" & _
            "Password=scl_edms;" & _
            "User ID=scl_edms;" & _
            "Data Source=sclprod"
                    
            Set oCn1 = New ADODB.Connection
            oCn1.Open connection1
    'End of Connnection to DB
    
    Directory = "c: emp"
    FType = "*.tif"

    With Application
        .FileSearch.FileName = FType
        .FileSearch.LookIn = Directory
        .FileSearch.Execute
      
        If .FileSearch.FoundFiles.Count > 0 Then
            Documents.Add (DotPath)
        End If
      
        'For Retrieving the Starting Page # if entered in the Clerks Paper Form.
            sSQLStmt3 = "select nvl(stpageno,0)as stpageno from scl_edms.appeals_pkg where id = (select min(id) from scl_edms.appeals_pkg) "
                Set oRs3 = oCn1.Execute(sSQLStmt3)
                StartPage = oRs3.Fields("stpageno").Value
        'End of Retrieving the Starting Page #
        
        'Count of number of sub doc numbers for appeals package
                sSQLStmt6 = " select count(subdocnum) subcount from scl_edms.appeals_pkg "
                    Set oRs7 = oCn1.Execute(sSQLStmt6)
                    Sub_Count = oRs7.Fields("subcount").Value
        'End of count of sub doc numebr for appeals package
    
      
        ' Initializing variables.
            temp_secid = 0
            v_tmp = ""
        
            If (IsNull(StartPage) Or (StartPage = 0)) Then
                    v_start_page = 1
                    v_end_page = 0
            Else
                    v_start_page = StartPage
                    v_end_page = v_start_page
            End If
            
            ReDim TifName(0)
        'End of initializing variables
            
            'Fetching of the TIF filename from the database
            sSQLStmt4 = " select ap.docid, i.filename "
            sSQLStmt4 = sSQLStmt4 + " from scl_edms.appeals_pkg ap, hv_user.hvdocument d, hv_user.hvdocsec s, hv_user.hvimages i "
            sSQLStmt4 = sSQLStmt4 + " where ap.docid = d.docid and d.docid = s.docid and s.secid = i.secid "
            sSQLStmt4 = sSQLStmt4 + " order by ap.id "
            
            Set oRs5 = oCn1.Execute(sSQLStmt4)
            'End of fetching of TIF Filename from DB
            J = 1
            
            Do While Not oRs5.EOF
                Docid = oRs5.Fields("docid").Value
                TifName(0) = oRs5.Fields("filename").Value
                TifName(0) = CStr(J) & "_" & TifName(0) & ".tif"
                
                .FileSearch.FileName = TifName(0)
                FName = "c: emp" + TifName(0)
                sSplit = Mid$(FName, Len(Directory) + 2)
                position = InStr(sSplit, "_")
                sFilename = Left$(sSplit, Len(sSplit) - 4)
                sFilename = Right$(sFilename, Len(sFilename) - position)
            
            'Query to get Docket Description and Sub Doc Number from Appeals Package table and Docket table
               sSQLStmt1 = " select substr(ap.DOCKET_NAME, 1,100)docket_name, dk.SUB_NUMBER, i.filename, dk.docid, i.secid "
               sSQLStmt1 = sSQLStmt1 + " from hv_user.hvimages i, hv_user.hvdocument d, hv_user.hvdocsec s, hv_user.hvvolume v, scl_edms.docket dk, scl_edms.appeals_pkg ap "
               sSQLStmt1 = sSQLStmt1 + " where ap.docid = dk.docid and dk.docid = d.docid and d.docid = s.docid and s.secid = i.secid and i.volid = v.volid "
               sSQLStmt1 = sSQLStmt1 + " and ap.docid = '" + CStr(Docid) + "' "
               
               Set oRs1 = oCn1.Execute(sSQLStmt1)
            'End of Docket Information Retrieval
                
                    Docket_Desc = oRs1.Fields("docket_name").Value
                    Sub_Number = oRs1.Fields("sub_number").Value
                    v_secid = oRs1.Fields("secid").Value
                       
                    CurPage = Selection.Information(wdActiveEndAdjustedPageNumber)
                    
                    'Retrieving the max page number for the specific secid
                        sSQLStmt3 = " select max(a.pageno) as pageno from hv_user.hvimages a, hv_user.hvdocsec b "
                        sSQLStmt3 = sSQLStmt3 + " where b.Docid = Docid and a.secid = '" + CStr(v_secid) + "' "
                        sSQLStmt3 = sSQLStmt3 + " and b.secid = a.secid "
    
                        Set oRs4 = oCn1.Execute(sSQLStmt3)
                        Pageno = oRs4.Fields("pageno").Value
                    'End of retrieving the max page number
                    
                    'Display of Page Number in the Footer on the right
                    If StartPage = 0 Then
                    
                        Selection.InlineShapes.AddPicture FileName:=FName, _
                        LinkToFile:=False, SaveWithDocument:=True
                        Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
                        Selection.InsertBreak Type:=wdSectionBreakNextPage
                                           
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).Range.Font.Size = 9
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text = Docket_Desc
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).LinkToPrevious = False
                               
                            If (v_tmp = Docket_Desc) Then
                                v_end_page = (v_start_page + Pageno - 1)
                            Else
                                    With Selection.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers
                                                .NumberStyle = wdPageNumberStyleArabic
                                                .IncludeChapterNumber = False
                                                .ChapterPageSeparator = wdSeparatorHyphen
                                                .RestartNumberingAtSection = False
                                                .StartingNumber = v_start_page
                                    End With
                                             Selection.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.Add PageNumberAlignment:= _
                                                 wdAlignPageNumberRight, FirstPage:=True
                                    v_start_page = v_end_page + 1
                                    v_end_page = (v_start_page + Pageno - 1)
                                    v_tmp = Docket_Desc
                            End If
                    Else
                        'If user enters a different page number
                        Selection.InlineShapes.AddPicture FileName:=FName, _
                        LinkToFile:=False, SaveWithDocument:=True
                        Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
                        Selection.InsertBreak Type:=wdSectionBreakNextPage
                            'Selection.InsertBreak Type:=wdPageBreak
                        
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).Range.Font.Size = 9
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text = Docket_Desc
                        Selection.Sections(1).Headers(wdHeaderFooterPrimary).LinkToPrevious = False
                               
                            If (v_tmp = Docket_Desc) Then
                                v_end_page = (v_start_page + Pageno - 1)
                            Else
                                'Currently commented as it does not display the correct page number
                                    
                                    'With Selection.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers
                                    ' .NumberStyle = wdPageNumberStyleArabic
                                    ' .IncludeChapterNumber = False
                                    ' .ChapterPageSeparator = wdSeparatorHyphen
                                    ' .RestartNumberingAtSection = True
                                    ' .StartingNumber = v_start_page
                                    'End With
                                    ' Selection.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.Add PageNumberAlignment:= _
                                    ' wdAlignPageNumberRight, FirstPage:=True
                                    
                                'End of commented code
                                        
                                If Sub_Count > 1 Then
                                        v_start_page = v_end_page + 1
                                        v_end_page = (v_start_page + Pageno - 1)
                                Else
                                        v_start_page = v_end_page '+ 1
                                        v_end_page = (v_start_page + Pageno - 1)
                                End If
                                v_tmp = Docket_Desc
                            End If
                    End If
                    'End of Display of Page Number in the Footer on the right
                    
                    'Adding # of pages for each section to the DB (Appeals_Pkg)
                        sSQLStmt2 = " update scl_edms.appeals_pkg "
                        sSQLStmt2 = sSQLStmt2 + " set pagenos = '" + CStr(v_start_page) + "'//'-'//'" + CStr(v_end_page) + "' "
                        sSQLStmt2 = sSQLStmt2 + " where docket_name = '" + Docket_Desc + "' and docid = Docid "
                        
                        Set oRs3 = oCn1.Execute(sSQLStmt2)
                    'End of Adding # of pages to DB
        
                        With Selection.Font
                            .Name = "Arial"
                            .Size = 10
                            .Bold = True
                        End With
                oRs5.MoveNext
                J = J + 1
            Loop
    End With

    oCn1.Close
End Sub
------------------------------------------------

Please HELP !!!

Thanks,
Rick

Select A Single Page In Word
How do I select a single, specific page in word, say the first one and then protect/lock it?

 

Open A Copy Of A Word Document In Html Page
Hallo everyone,
I want to open a copy of a document clicking a link in a html page.
I try with ActivexObject:

var wd = new ActiveXObject("Word.Application")
wd.Documents.Open("file:example.doc")

But the problem is that in this way it always the original copy to be open and not a temp file.
Could anyone help me?
Thank you
Adperi

Urgent! How To Insert Page Numbers To A Word Document?
Hi everyone,

I'm currently trying to create a Word document from VB 6. Does anyone know how to insert page numbers to a Word document?

Thank you very much.

Outputting Address Information To A Word Multi Lable Per Page Template - Any Ideas?
Hi, given addr1,addr2,town etc etc, I need to create a word document from a template which has 3x8 pre-defined areas for stickly lables. Any thoughts on how to do this?

Building A Multipage Document From Single Page Word Documents.
I have been playing with the following code to produce a single document from multiple word documents and it is just not working. At one point it did work but now I am only getting a one page document. The source documents are coming from a directory and that works. In debug it loops correctly. I am at a loss. Thanks for all replies.

Set WordSelection = prtWordDoc.Content
WordSelection.Start = WordSelection.End
    
On Error Goto WordError
strFileName = Dir$(strPathName, 0)    
    
Do While strFileName <> ""
    If( Ucase(Left(strFileName,4)) = "CERT") Then
            Goto GetNext
    End If
        
    WordSelection.InsertBreak constPageBreak        
    Set WordSelection = prtWordDoc.Content
    WordSelection.InsertFile strPathName & strFileName
    Set WordSelection = prtWordDoc.Content
    WordSelection.Start = WordSelection.End
        
GetNext:
    strFileName = Dir$()        
    Loop
    
    prtWordDoc.saveas(strPathName & "tempDocs.doc")

 

Page Number && Page Count In Word (automation)
I think I've searched quite everywhere for this, and I haven't found any information at all. I want to be able to write (in VB) the page number and page count in the footer of a Word document, using Automation. I can alreay write the page number OR the page count, but not both, and I can' t add text to the footer.

I want something like "Page 2 of 5" in the footer of every page of the Word document, but I can't seem to get the hang of it, and I've run out of options. Thanks to anyone taking the time to read this post, and many thanks to anyone with a possible solution!

Raggart

I Need To Extract The Page Number From The Current Page In Word
I need to extract the page number from the current page in word and put it in to the variable pgNum

HELP!!

Displayed Page Number Vs. Word Page Num
I'm trying to get the page num which appears in the footer using the {PAGE} field into a VBA variable. I've tried using:

Selection.Information(wdActiveEndPageNumber)

but that returns the actual Word page number (ex: 5), rather than the {PAGE} num (ex: 2-1)

Any assistance is appreciated.

01000111

Word - Read Page By Page
Hi guys,

I'm creating macro to send Word document as Fax to an API. From the Word template, I need to pick up three fields (Fax No, Sender Name & Subject) from each page and send the particular page as Fax. Then I need to jump to next page and select the next 3 fields and send that page as Fax.
I know how to search the fields in the document by using Code:Selection.Find.* command. But how do I read Page by Page? Currently, it always goes back to the first page when I do the search.

Please help.

P.S. The document is created by using Mail Merge and may consists hundreds of pages.

 

Printer Change Page Orientation From Page To Page
I'm running VB 5. Is it possible to change the page orientation from one page to another.

portion of code:
If page_orientation(gridno) = 0 Then
Printer.Orientation = vbPRORPortrait
Else
Printer.Orientation = vbPRORLandscape
End If

If I use "Printer.EndDoc" before the above code, the program works fine. Each page is a separate 'print-job' with the orientation that I want. A problem arises when I want to print to a .PDF printer: each page is saved as a separate PDF because they're all separate 'print jobs'.

If I substitute "Printer.EndDoc" with "Printer.NewPage", I get the error "orientation property cannot be set within a page". Is there any way to get around this?

Err: 'Page Header Plus Page Footer Is Too Large For The Page' With CR9.0
Dear All

I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.

But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'

To Mention : I am using the custome page size i.e. 6" x 8"..

Can any body help me plz...

Regards,
K****ij

Err: Page Header Plus Page Footer Is Too Large For The Page Using CR9.0
Dear All

I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.

But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'

To Mention : I am using the custome page size i.e. 6" x 8"..

Can any body help me plz...

Regards,
Kshitij

Multi-Page Tiff
Who does know principle of merging simple TIFFs to one MULTI-PAGE TIFF?
In this case, input parameters should be selected directory (string) and a flag in reference to deleting the originals.
If I input the directory, I get array of *.TIF files in it. I want to merge the all files in it into one multi-page TIFF named after the input directory. The program will also merge TIFFs in the subdirectories to multi-page TIFFs named after the entire directories.

Head of the important routiny should look this way:
CreateMultiTiff(localFiles() as string,removeOriginal as string)
I want this procedure with the body, too.
Example:
MYPARENTDIR
-------------local1.tif
-------------local2.tif
-------------local3.tif
-------------CHILD1
-------------------child11.tif
-------------------child12.tif
-------------------child13.tif
-------------CHILD2
-------------------child21.tif
-------------------child22.tif
-------------------child23.tif
-------------CHILD3
-------------------child31.tif
-------------------child32.tif
-------------------child33.tif

After merging
MYPARENTDIR
-------------myparentdir.tif
-------------child1.tif
-------------child2.tif
-------------child3.tif

P.S.
It's very urgent, the answer should come maximally till tomorrow, but rather today (21th December) before the evening.

Multi Page Datareport!
Hi,

I have many fields in a database which does not fit in a single page. How can I generate a report of more than 1 page in using datareport. I mean half of the fields data will display in page 1 and rest fields data in page 2.

Any help plssssssss?

Thanks

Multi-Page TIFFs
Hello everyone,

is it possible to handle (view an print) multi-page TIFFs with standard VB components?
If it is, how do I do that?

Multi-page Question?
Hi

Could anybody please help me out with the code to move from one page to another page within a multi-page object via a command button rather than clicking on a tab.
This is being done through VB-Script.

Thanks


Gregg

Crystal Multi Page
Is there a way to create a multi page report? I need three pages in my report.

Creating A Multi Page App For The Web
I feel kind of insane asking this, but here goes:

Our customer has asked us to quote on a new project, and rather than create a regular standalone VB app like we have been doing, they now state that they are requiring applications to run in a browser - the justification is purely to have the same look and feel between applications (never mind that the contents of the window could be whatever we want). This is all well and fine, but the application isn't just your run of the mill enter data & crunch away kind of thing - it is basically an HMI to a PLC system, utlilizing several instances of the Winsock control to do communications (this is all custom messaging), and uses several forms - one per 'screen'. The application reads in status info and updates 'animated' widgets that we have created as user controls to draw things like filling bargraphs and whatnot.

The current standalone implementation of the application has a hidden form that deals with all of the communications, and then calls the various screen update functions, depending on which screen is currently shown. Having never written an application destined for use in a browser, I'm a little lost at where to begin. The ActiveX document solution seemed like a start - but how would I create a background process that did the communications monitoring and notifications to screens?

As an aside, the customer initially wanted us to hook into IE and replace the standard menubar with our own menu - we pushed back and stated that doing something like that could tightly couple the app to whatever version of IE they used and would not be very 'portable'. They also stated that we could hide the buttons, URL bar, and title bar and essentially make our own...which begs the question "Why do you need a browser then?"

This application will be installed locally and run locally. There is no server in the system, just the PLC that shoots out data packets. Personally I don't feel that their requirement gets them anything, given that it is a local app and they plan to keep it that way. Any suggestions on how we could even go about implementing something like this? We had also proposed a Java solution, but some of the Applet limitations (we need to be able to save a file to disk from within the app) may steer us away from that.

Any ideas would be appreciated, thanks!

Creating Multi-page .tifs
I am trying to find a way to combine 2 (or more) single page .tifs into a single, multi-page .tif. My program is exporting images from our 3rd party imaging system, which exports each page of a document as a separate .tif (i.e. 3 pages = 3 files). I'd like to combine these into one file.

I know this can be done when you are viewing an image in Imaging for Windows you can, but I want to be able to do it within my program.

Thanks,
Kevin

"So much time, so little to do." - Willy Wonka

Crystal Rep API Multi-page Report
Hi!
I have made a report with CR APi that was made to be used with an access database and Act! database. The report was designed to work with one contact at the time but now I need to loop through the act database to create a report for a number of contacts. I tried to loop through my records and create the report but it overlaps in Crviewer. What I want to do is create a report per page. I tried grouping but can't get it to work since there is no grouping condition possible from my access database. The only grouping is from my Act database. Here's what it looks like:

{header}
(all textobject only)
----------------------------
{Detail}
(act record) <--- this is the record that I would need to use to create a group everytime it changes

(data from access related to my act record)
-----------------
{footer}
(textobjects only)

Any idea?

thanx

Creating A Multi-page Tiff With VB6
Hello,

is it possible to create a single multi-page Tiff from a number of
bitmap images with VB6. I know there is some 3rd party tools to do this,
but I'm looking for some open-source code or API that I can use/call
from my own code.

Thanks
--
Shane Mitchell

Tel:+353 61 335000
Fax:+353 62 335477
WWW:http://www.docosoft.com

Creating Multi-Page Tiffs With VB6
Hello,

Is it possible, with VB6, to create a multipage Tiff document from a nuber
of bitmaps. A look through MSDN didn't reveal anything, and I was hoping
somebody might know of a control or API available for download that I
could use.

Any help/advice would be greatly appreciated.



Shane Mitchell

Tel: +353 61 335000
Fax: +353 61 335477
www: http://www.docosoft.com

Multi Page Report W/dynamic Images
Here is the situation. I'm able to display one image but I have two images on the report. The report is a two page report. One image on page one and one on page two. Here is the code I'm using:



Code:
Private Sub Section5_Format(ByVal pFormattingInfo As Object)

PPNNumber = Me.Database.Tables.Item(1).Fields.Item(177).Value
CardNumber = Me.Database.Tables.Item(4).Fields.Item(91).Value
PictureFileName = Right$("000000" + Mid$(Str(PPNNumber), 2), 6) + Right$("00" + Mid$(Str(CardNumber), 2), 2) + ".jpg"
100 Set Picture2.FormattedPicture = LoadPicture(UniversDatPath + "PICTURE" + PictureFileName)
Set Picture1.FormattedPicture = LoadPicture(UniversDatPath + "sketch" + PictureFileName)

ErrorHandler:
If Err = 53 Then
PictureFileName = "NOAVAIL.jpg"
Err = 0
GoTo 100
End If

End Sub
One image on the main report and the other is on a subreport. I get an error on PICTURE1.formattedpicture which is "PERMISSION DENIED" Error 70. When that line is executed. I imported my report from Crystal reports 8.5. This was a .rpt. All subreports were rpt also. That created my .dsr report from within vb6. Because I imported from an existing .rpt file do all subreports contained in the main report have to be reimported to establish that they are .dsr files in order to dynamically change images on any of them which contain a ole object?? If you need further info just post it. I will respond.

Programatically Creating Multi-Page TIFS
I have an app that currently uses Print2Image to print from an app to a TIF file. It can print multiple TIF files. I then use the Wang Image controls to combine the multiple TIF files with a cover sheet into one multi-page TIF file. Then I print that TIF file to the local printer.

We're upgrading to Windows XP, and the Wang Control is no longer licensed for use by Microsoft. Has anybody done this using anything else? What would be the most direct/efficient code or control to use for this?

Thanks in advance!

Tim

Editing A Multi-page (the Thing With Tabs)
Hi, ive added a multi-page to a form (i think the multi-page i added was from the 'Microsoft Form Objects 2.0'), i can edit the captions and all that stuff but when i add objects to it i dont know how to edit their properties. it wont let me do anything with them.
How can i edit them just like a normal object on a normal form? if there is a different way to do it, how?

cheers.

Selection Save As Multi Page Tiff
I need to copy a small selected part of image and save it to another image as multi page.
Any samples ?

Multi-page TIFF File Display
Hi,

Does anybody know a way to be able to show all the pages of a TIF file without having to use

the Image Control?

I will really appreciate your advice on this,

Brenda
brendaivett@yahoo.com

Multi-page Data Entry Screens
Hello all. I am working on a VB program which will involve a significant number of data entry fields that fall into one of six or so categories. I don't want to crowd all those fields onto one form so naturally I want to use something like a TabStrip to subdivide the fields by categories. I ran into some problems with the TabStrip...controls showing up on more than one tab page and so forth. So I tried this alternate approach: I created Command buttons to take the place of the tabs and Frames to take the place of the tab pages. The Command buttons contain code to set the Visible property of all but one Frame to False (and the Visible property of the intended Frame to True). This works for me if I have only two Frames involved, but when I try it with more than two Frames, one or more of my Frames will not appear when I click the associated button. Have any of you good people run across this behavior before and/or any ideas how I can accomplish my goal? If I'm not being clear enough I can go into more detail, please let me know and thanks in advance for any suggestions.

Multi Page Image Viewer Solution
ImageViewer CP 2.0 release
You can Print the Image to Printer.
Smooth Scrolling improvement in Version 2.0.
Rotate and zoom the image easily.
Export Image to JPEG, GIF, BMP, TIFF, PNG according to your chosen size of display area.
Support loading Multi-Page Image File(TIF).

download vb sample code
http://viscomsoft.esmartweb.com

Separate A Document By Page
Hi all,

I am now working on a project that needs to separate a Word document into pages, i. e. the original document contains multiple pages, and separate each page to a new word file.

Can anyone help?

Qubeley

Count # Page Within Document?
Help..
Any one know how to count the number of page within a document?

Thank you..



Edited by - kunkhmer on 11/24/2003 3:08:21 PM

How To View Multi Page Tiff With Text Annotation
give solution, how to view multi page tiff with text annotation

How To View Multi-page Image Files (TIFF)?
Hi

Viewing image file of bmp format is not a problem. but, I dont know how to view multi-page format files such as TIFF in picture box.

Any help?

Convert Multi-page TIF To Jpg W/o Using Kodak Image Control
In VB6.0 environment, anyone know how to convert multi-page TIF image to jpg format. I know that Kodak Image control can do so but seem that it can work well under Wondows 2003. I have also try GDI+ but don;t know how it can handle multi-page format.

Printing A Document With Page X Of Y Gets Y Wrong.
Strangest thing with Page X of Y. If I stop the program before the ActiveDocument.PrintOut Background:=0 instruction then the Page X of Y numbers seem correct. If I let the program fly then the 'Y' stays as 2 which was the template document's value in the Footer. Does anybody have any ideas about this ?

How Do I Print And Save Only The First Page Of A Document?
Sounds like a silly question... I know. Basically, if a value in my Access database is less than 2, I need to delete the second page of a word document and then save and print it. It should look something like this:

If x < 2 then

objWord.ActiveDocument.DeleteSecondPage

end if

objWord.ActiveDocument.PrintOut (acPrintAll)
objWord.ActiveDocument.SaveAs....

Nothing complicated, I just can't figure out the commands. Any help would be greatly appreciated.

How To Select A Page
Hi,

I need to copy a specific page of a word document (say enter page 2) and copy all of the contents of that page into a new document (say "New Document").

The problem is how to select the text on that page alone (ie I can't use wdParagraph etc) and how to specify to copy it to a new word doc (since the new document name could change depending on how many new docs you created in that session).

Can anyone help? I'm mostly concerned about copying the page contents. Any help will be appreciated.

Thanks,

Michael

Page No Select
Hello,

Can anyone put a code here that when i click the print command It will launch a printer so i can select what page no.


I use a data and i 'am using access for my database.

Thanks,
Ronald

I Know How To View Multi-page With Annotation Files Such As TIFF In Picture Box.
I know how to view multi-page format files such as TIFF in picture box.
But dont know how to view Tiff files with Text Annotation
Any help?

Multi-page Scans Using Kodak Image Scan Control
I am trying to use this ocx to scan multiple pages. I wish to insert a doc into the scanner, scan it, insert the next doc, scan it etc until finished so the end result is a file with multiple images. I can only get this to work with a single scan. when i attempt to scan page 2 I either get an error saying the file exists or i get an invalid page number depending on the settings of the .PageOption and .Page properties that i may have played about with at the time. Is there any way I can multiple scan documents into a single file using this control?

Thanks for any help or ideas!

Publishing An Excel Document Which Has Macros As A Web Page
Hi there people ,

I've got an excel workbook which contains macros ,
I've tried publishing this as a webpage by clicking on 'File' & 'Save as webpage' in Excel
The html files are saved successfully to the specified directory..

The problem i'm having is when i open the html file then in I.E , all the vb command buttons on the
excel sheets are disabled , thus disabling the macros.... Is there any way to publish an excel workbook
as a web page and have all the marco's run.....

Another question which i have is , how do I disable the horizontal and vertical scroll bars on a specific sheet
on an excel workbook..

Thanks.....

Copyright © 2005-08 www.BigResource.com, All rights reserved