[dba-Tech] Determine current position in Word

Bryan Carbonnell carbonnb at gmail.com
Thu Aug 25 05:48:13 CDT 2005


On 24/08/05, Arthur Fuller <artful at rogers.com> wrote:
> Now, I try your second example code fragment. I had a problem with the line:
>         Set rng = doc.Bookmarks("BookmarkName").Range
> I changed it to:
>         Set rng = doc.Bookmarks.Item("AdditionalInformationTable")
> Then it compiled successfully (Access 2003). However, nothing is there in
> the resulting document where the table should be. All the other bookmarks
> have been successfully populated, but not the one where I want to plant the
> table(s).
> I am obviously doing something wrong. Please tell me what it is.

A couple of things come to mind, keeping in mind I don't have O2K3 to test with.

1) Does your doc variable point to the new document based on the template?
2) The line Set rng = doc.Bookmarks.Item("AdditionalInformationTable")
should actually be:
Set rng = doc.Bookmarks.Item("AdditionalInformationTable").RANGE
3) Is the document/template protected in way? (Tools|Protect Document...)
4) Try opening the rtf file in Word and then save it as a Word
document. It may not like inserting RTF.

The first 2 is my best guess as to why it's not working. The other 2
are just WAGs.

-- 
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!"



More information about the dba-Tech mailing list