Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Copy cells from Excel to Word

  Asked By: Diane    Date: Nov 21    Category: MS Office    Views: 1011
  

I have a range of cells in Excel 2003 that I need to copy into Word. I
have the code to open Word, but the marco won't paste the data.

Also; this is going out to several users. Can I trust if they are
using Excel, they will have Word? Do I need to set up error checks to
ensure Word is on their system; or use OnError to flag a msgbox if the
macro can't open Word?


Sub Macro1()
Const xlMicrosoftWord = 1

Range("B2:B3").Copy
Application.ActivateMicrosoftApp (xlMicrosoftWord)
Selection.Paste
End Sub

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Ludo Ricci     Answered On: Nov 21

If, in your user environment, there is the possibility that a use does not
have word
I would definitely use OnError to control the flow.
In our facility, Excel is always installed with Office, so if they have
Excel, they
have Word.

As for your copy/paste issue:
can you post your code?
I'll have to play with it a bit.
I've done it before, but I don't have the code with me now.

 
Answer #2    Answered By: Luigi Fischer     Answered On: Nov 21

I've never used the " Application.ActivateMicrosoftApp (xlMicrosoftWord)"..
so i can't say on that.. every time i've had to communicate with word  i did it
using a vba procedure and created a word object. i can dig up some code for that
if you would like..

 
Answer #3    Answered By: Latasha Wilson     Answered On: Nov 21

I found the answer on the web. Here is one way of Coping from Excel to Word in
case you need it later.

Step 5 was the key I was missing.

 
Didn't find what you were looking for? Find more on Copy cells from Excel to Word Or get search suggestion and latest updates.




Tagged: