robertsmith28
asked on
Word Automation - paragraphs and bullets
I'm using Excel '97 to produce a report in Word '97. I'm exporting data from the Excel file to the report. The main difficulty I'm having understanding the InsertAfter statements and exactly how to just put some text at the end of the current document or format the text which I've just inserted. For example, I want to loop through a cloumn of cells until they are blank, putting the contents of each cell as a new paragraph, sequencially and each one of them with a Bulletpoint:
dim wordapp as word.application
dim worddoc as word.document
Set wordapp = CreateObject("Word.Applica tion")
Wordapp.Documents.Add
Set WordDoc = wordapp.ActiveDocument
do while Trim(Range(Chr(intRow +65) & 1)).Value <> ""
WordDoc.Content.MoveEnd
WordDoc.Content.InsertAfte r Worksheets("Sheet1").Range (Chr(intRo w+65 &65).value
'some code which will put a formatted bulletinfront of the above?
loop
Please state if clarifcation is required....
Any comments greatly appreciated.
dim wordapp as word.application
dim worddoc as word.document
Set wordapp = CreateObject("Word.Applica
Wordapp.Documents.Add
Set WordDoc = wordapp.ActiveDocument
do while Trim(Range(Chr(intRow +65) & 1)).Value <> ""
WordDoc.Content.MoveEnd
WordDoc.Content.InsertAfte
'some code which will put a formatted bulletinfront of the above?
loop
Please state if clarifcation is required....
Any comments greatly appreciated.
Hi robert,
I posted a question in the MS Office topic area for you, pointing to this one.
Nosterdamus
I posted a question in the MS Office topic area for you, pointing to this one.
Nosterdamus
ASKER
Nosterdamus,
Thanks - so have I - did n't realise which area I was in - oops!
Thanks - so have I - did n't realise which area I was in - oops!
Should I delete my link question?
ASKER
Actually it was my other misplaced question! Thanks - just leave I reckon.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
P.S. I changed the Chr(IntRow + 65) & 3 a little to match my sample sheet I was working on.
Hi cal,
Nice to see you again... ;-)
Nosterdamus
Nice to see you again... ;-)
Nosterdamus
ASKER
calacuccia,
That looks great - I'll just try to implement it - back in an hour or two...
Rob.
That looks great - I'll just try to implement it - back in an hour or two...
Rob.
ASKER
calacuccia,
That looks great - I'll just try to implement it - back in an hour or two...
Rob.
That looks great - I'll just try to implement it - back in an hour or two...
Rob.
Hi Rob,
Just a hint. to avoid multiple postings, use the Reload Question link at the top of the page, instead of hitting the Browser's reload button.
Nosterdamus
Just a hint. to avoid multiple postings, use the Reload Question link at the top of the page, instead of hitting the Browser's reload button.
Nosterdamus
ASKER
Thanks calacuccia, as always, was exactly what I was looking for - excellent!
ThAnks, robert.
Regards
calacuccia
Regards
calacuccia
ASKER
calacuccia,
this one's also in the wrong area for 70 - FYI.
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=msaccess&qid=20164520
this one's also in the wrong area for 70 - FYI.
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=msaccess&qid=20164520
ASKER
introw = 1
do while...
..
..
..
..
intRow = intRow + 1
Loop