Excel to Word

E

EA

I am trying to write a procedure which, from Excel, creates a Word document
and then adds text at various bookmarked locations.

I have got the code which creates the document but I am having trouble
inserting a range of cells from Excel.

The first two lines below work fine, but the last errors

.Bookmarks("Client").Range = Range("A7")
.Bookmarks("ClientContact").Range = Range("B7")

.Bookmarks("DealTable").Range = Range("DealRange")

Does anyone have any code or any references which will point me in the
direction of an answer to how I insert a names range of cells into a Word
document.
 
I

Incidental

Loading word from excel takes an age!!! I was doing a project that I
thought about doing the same thing as you are describing (I think???) I
found that even when I got it working it took almost a minute or longer
for word to actually open.

I ended up just adding a new worksheet and formatting it the same as
the word document and it looks just as good as the word doc, it runs
like lightening and it was an awful lot easier to write the code.

I know this isn't exactly the answer you are after but I thought I
would give you the info as when I was faced with this it is what I
ended up doing.

Hope you find your answer...

S
 
E

EA

I am trying to write a procedure which, from Excel, creates a Word document
and then adds text at various bookmarked locations.

I have got the code which creates the document but I am having trouble
inserting a range of cells from Excel.

The first two lines below work fine, but the last errors

.Bookmarks("Client").Range = Range("A7")
.Bookmarks("ClientContact").Range = Range("B7")

.Bookmarks("DealTable").Range = Range("DealRange")

Does anyone have any code or any references which will point me in the
direction of an answer to how I insert a names range of cells into a Word
document.
 
G

Guest

Why don't you try copying "DealRange", which I assume is a multiple cell
range. Then do something like:

Bookmarks("DealTable").Select
Selection.Paste
 
G

Guest

What is the error message? Just guessing, but it is probably related to your
Range("Deal Range") reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top