ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Word positioning from Excel (https://www.excelbanter.com/excel-programming/283300-word-positioning-excel.html)

Taras

Word positioning from Excel
 
I've created a Word document and written to it from Excel.
I can insert page breaks as required and continue writing
from there.

What I can't do is insert a table at the current end of
document. It always goes to the top.

What is the easiest way to always insert text, tables,
etc. at the current end of Word document?

TIA

Joe Bloggs[_2_]

Word positioning from Excel
 
Taras

Recording a macro in Word to go to the end of the document
gave me

Selection.EndKey Unit:=wdStory

Insert this before the copy

Peter Atherton
-----Original Message-----
I've created a Word document and written to it from Excel.
I can insert page breaks as required and continue writing
from there.

What I can't do is insert a table at the current end of
document. It always goes to the top.

What is the easiest way to always insert text, tables,
etc. at the current end of Word document?

TIA
.


Taras

Word positioning from Excel
 
Thanks, that worked. I guess I had been banging my head
trying different things to try Word macro avenue. Just
to clarify, the code you need in excel is:

Dim wdAPP As Word.Application
Dim wdDoc As Word.Document

'appropriate opens

With wdDoc
wdAPP.Selection.EndKey Unit:=wdStory
End With
-----Original Message-----
Taras

Recording a macro in Word to go to the end of the

document
gave me

Selection.EndKey Unit:=wdStory

Insert this before the copy

Peter Atherton
-----Original Message-----
I've created a Word document and written to it from

Excel.
I can insert page breaks as required and continue

writing
from there.

What I can't do is insert a table at the current end of
document. It always goes to the top.

What is the easiest way to always insert text, tables,
etc. at the current end of Word document?

TIA
.

.



All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com