Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default inputting text on Word document using excel

hi
i wish to use Excel VBA to include/insert text from some data into Word
document.
the word document has the following simple format

Name: Number Login Id
--------------------------------------------
<name <number <id

<name, <number, and <id are to be inserted under then line
"-------".
If there are multiple <names, <number and <id, it will be inserted
under each other..
Name: Number Login Id
--------------------------------------------
<name <number <id
<name <number <id
<name <number <id
.....

Is there some good guides or tutorials that can show me how to do this?
thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default inputting text on Word document using excel

Turn on the macro recorder in both Excel and Word. then perform the action
manually. Turn off the macro recorder in each. No combine the code. You
will need to add code to get an instance of Word from excel using getobject
(assumes word is open) or createobject. If you are using late binding, then
you will need to replace any constants recorded with the actual value they
represent.

Good source to start learning about automation:
http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL


http://support.microsoft.com/?id=165518
Calling Macros Using OLE from MS Visual Basic for Applicatons
(this has word running an excel macro, but the idea should the same)

http://support.microsoft.com/?id=149830
XL: Macro to Link a Range of Cells in Word
(Example of Excel controlling word)


http://support.microsoft.com/?id=165926
OFF97: Can't Dimension Word as Application from Other Program
(Examples of Working with Word 97 using OLE)

http://support.microsoft.com/?id=135082
Invalid Page Fault Running VB Macro in Hidden Word Session
(Word 7, when Word is Closed causes a problem)



--
Regards,
Tom Ogilvy

wrote in message
oups.com...
hi
i wish to use Excel VBA to include/insert text from some data into Word
document.
the word document has the following simple format

Name: Number Login Id
--------------------------------------------
<name <number <id

<name, <number, and <id are to be inserted under then line
"-------".
If there are multiple <names, <number and <id, it will be inserted
under each other..
Name: Number Login Id
--------------------------------------------
<name <number <id
<name <number <id
<name <number <id
....

Is there some good guides or tutorials that can show me how to do this?
thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attach Word document to a text box in Excel Ahmed Habib[_2_] Excel Discussion (Misc queries) 0 July 15th 09 08:23 PM
Attach Word document to a text box in Excel Ahmed Habib[_2_] Excel Discussion (Misc queries) 1 July 15th 09 03:13 PM
Attach Word document to a text box in Excel Ahmed Habib Excel Discussion (Misc queries) 1 July 14th 09 07:58 PM
moving text from a word document to excel gregp22 New Users to Excel 2 March 21st 06 06:18 PM
Accessing a Text Box in a Word Document from Excel Ben Excel Programming 1 November 12th 04 06:52 AM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"