[AccessD] Inserting text in a word document

Jim Dettman jimdettman at earthlink.net
Fri Feb 10 13:30:08 CST 2006



 It's old code.  First did that back in Access 2.0.  Still works in
everything that I use so...

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bryan
Carbonnell
Sent: Friday, February 10, 2006 1:20 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Inserting text in a word document


On 10/02/06, Jim Dettman <jimdettman at earthlink.net> wrote:

>                 mobjWord.WordBasic.INSERT
> pelNullToZLS(rstData(avarFields(pelFldAccessField, intJ)))


Ick!!! WordBasic!!!!

John,

Here is a little chunk that should do it for you:

Dim doc As Word.Document
Dim rng As Word.Range

Set rng = doc.Bookmarks("MyBookmarkName").Range

rng.InsertAfter "This text gets inserted after the bookmark"

--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list