Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the excel portion of the code.
Sub GetParagraphs() Set WordList = Sheets("Sheet1").Range("A1:A100") Set ParagraphTitle = Sheets("Sheet2") filetoOpen = Application _ .GetOpenFilename("Word Files (*.doc), *.doc") If filetoOpen = False Then MsgBox ("Cannot Open File - Exiting Macro") Exit Sub End If Set WordObj = GetObject(pathname:=filetoOpen) WordObj.Application.Visible = True ParRowCount = 1 For Each Word In WordList 'Enter Word Search code here 'ParTitle = "text found in word" ParagraphTitle.Range("A" & ParRowCount) = ParTitle ParRowCount = ParRowCount + 1 Next Word WordObj.Application.Quit End Sub "DR Bellavance" wrote: Thanks for the reply Joel. I was afraid you were going to say that but I didn't want to post to the "Word" discussion group until the "Excel" group had a shot at it. I am posting this query to the "Word" group under the same heading should anyone be interested in the response. -- DR Bellavance "Joel" wrote: Go to the Word Macro webpage. Moving around in the wrod document isn't simple and it would be better to get help with the word experts.. you c an still running the macro in excel. You need to create a wordobject in excel using either GetObject or or Createobject and then open the word document set Wordobj = GetObject(filename:="c:\temp\word.doc") ' put this in excel Then reference the macro that you get from the word experts using WordObj in front of the word macro commands. "DR Bellavance" wrote: I have an Excel workbook with a range of cells that contain some text. I need to find all instances of the text in a seperate Word document then, in an adjacent cell on the Excel workbook, paste all the paragraph headers where the text was found in the word document. Can anyone give me a clue??? I am using Excel 2007 on a Windows XP Pro system. -- DR Bellavance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Attach Word document to a text box in Excel | Excel Discussion (Misc queries) | |||
Attach Word document to a text box in Excel | Excel Discussion (Misc queries) | |||
where do i find word document | New Users to Excel | |||
The last column in my word document contains both text and number | Excel Worksheet Functions | |||
Exporting text to a Word document | Excel Programming |