Results 1 to 3 of 3

Thread: Word.Application and controling a word file

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    Israel the holy land
    Posts
    160

    Word.Application and controling a word file

    how can i open a word file
    search for an image in the word document, and make the image start from a new page soo all pages below will be pushed too of course
    is this possible?
    thnaks in advance
    peleg
    Israel - the best place to live in after heaven, but no one want's to go there so fast.

    http://www.networked-toys.com/
    http://www.nirlat.com/home_page.asp

  2. #2
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Word.Application and controling a word file

    I haven't tested this code:
    VB Code:
    1. Sub main()
    2.     'ASSUMES that a valid reference has been made to the most
    3.     'current version of Word in the Visual Basic Editor for Automation purposes
    4.     '(of either VB6 or another Microsoft (or other) application).
    5.     Dim wrdApp As New Word.Application
    6.     Dim wrdDoc As Word.Document
    7.  
    8.     wrdApp.Visible = True
    9.  
    10.     Set wrdDoc = wrdApp.Documents.Add
    11.  
    12.     With wrdDoc.Range.Find
    13.         .ClearFormatting
    14.         .Replacement.ClearFormatting
    15.         .Execute findText:="^g", Replacewith:="^m^&", Forward:=True, Wrap:=wdFindContinue, Format:=False, MatchCase:=False, MatchWildcards:=False, Replace:=wdReplaceAll
    16.     End With
    17.    
    18.     Set wrdApp = Nothing
    19. End Sub
    CS

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Word.Application and controling a word file

    Moved to Office Development

Posting Permissions

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



Click Here to Expand Forum to Full Width