Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word field value to excel cell - a little help please

Status
Not open for further replies.

A127

Technical User
Oct 31, 2005
1
US
I have a macro that copies from one form field to another in a Word 2003 document. I need to have the same information written to an Excel spreadsheet ("workcopy.xls") in cell "B5". I can't seem to be able to open Excel from within Word and place the information into the desired cell by any means I tried. Can someone give me a little guidance please.


Sub CopyField()
Dim Temp As String
Temp = ActiveDocument.FormFields("Examiner").Result
ActiveDocument.FormFields("DerivBCN2").Result = Temp

End Sub
 


A127,

Check out Help on GetOBject method. There's alot of detail on creating an Excel application object and checking the registry et al.

If you get stuck, post back with your code.

Skip,

[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top