Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba
EA EA is offline
external usenet poster
 
Posts: 28
Default Excel to Word

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba
external usenet poster
 
Posts: 226
Default Excel to Word

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
EA EA is offline
external usenet poster
 
Posts: 28
Default Excel to Word

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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,316
Default Excel to Word

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

Bookmarks("DealTable").Select
Selection.Paste

--
Kevin Backmann


"EA" wrote:

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.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Excel to Word

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

"EA" wrote:

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.






  #6   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba
external usenet poster
 
Posts: 510
Default Excel to Word

Hi,

Could following be if any help :

http://groups.google.com/group/micro...1bab5b809358a1

HTH
Carim

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
Need Excel count of 1 word if found in multi-word cells of column Function_Challenged Excel Worksheet Functions 1 August 27th 09 12:08 AM
Copy from Word to Excel, and retain indent, plus word wrap Eric Excel Discussion (Misc queries) 1 March 9th 07 03:15 AM
Import cells from excel into word and create multiple word docs scdaddy7269 Excel Programming 2 March 20th 06 07:03 PM
Print labels by using Excel data in a Word mail into word Zoey Excel Discussion (Misc queries) 1 November 1st 05 09:08 PM
Printing Word Document using Excel Programming hangs Word Alan Excel Programming 0 September 30th 04 08:41 PM


All times are GMT +1. The time now is 01:57 AM.

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

About Us

"It's about Microsoft Excel"