Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that pulls information from a word file but can't get to the
Header string. In word2003, I can get the following vba command to pull the text from the header. The question is how to run this command from within Excel. Working Word VBA Command test = ActiveDocument.Sections(1).Headers(wdHeaderFooterP rimary).Range.Text Failed Excel VBA Command test = oWord.Sections(1).Headers(wdHeaderFooterPrimary).R ange.Text Excel VBA Error: "Compile Error. Methood or data member not found." For reference, I've used the following other commands to run Word from Excel: Dim oWord As Word.Application Set oWord = GetObject(, "Word.Application") oWord.Selection.Find.ClearFormatting With oWord.Selection.Find .Text = "Product/DRD FAM" .Wrap = wdFindContinue End With oWord.Selection.Find.Execute 'Finds Start of EWO Body oWord.Selection.MoveRight Unit:=wdCell Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move logo from word document to excel header | Excel Discussion (Misc queries) | |||
I want to use a standard 'Word' field in my Excel header | Excel Discussion (Misc queries) | |||
Same header and footer in excel and word | Excel Worksheet Functions | |||
Tranferring Text from Excel to a Header in Word | Excel Programming | |||
Coyping from Excel to an MS Word Header | Excel Programming |