Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Nested Autotext possible??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ivan Debono - 13 Dec 2004 09:31 GMT
Hi all,

I currently use Word 2003 to create templates from which I create standard
documents with data coming from a database. I first design the page how I
want it to look and then set bookmarks on text that will be replaced by the
recordset values. I select the whole document or sections of the document
(depending on my needs) and place the text in Autotext entries. I then
delete everything a save the template. That's all.

This works fine from simple templates but I now I need something a little
bit more complex.

I have a master-details relationship that I need to print on a 5x3 index
card so the place is very limited. First come a few master fields one under
the other. Then I need to sort of have a 2 column table. The first column
displays the details fields (one under the other), whilst the second column
has a few more master fields.

Setting the bookmarks for the master & details fields is no problem. The
problem is the autotext entries. If I select all the text as my master
autotextentry, it will also include the details autotextentry. But I need to
have multiple details for each master record.

It is possible to have nested autotext entries? Is there an alternative
(maybe easier) way to do this?

Thanks,
Ivan
Jonathan West - 13 Dec 2004 11:50 GMT
Hi Ican,

Investigate using the AUTOTEXT and AUTOTEXTLIST fields. I think they might
be able to help you

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

> Hi all,
>
[quoted text clipped - 28 lines]
> Thanks,
> Ivan
Ivan Debono - 13 Dec 2004 12:23 GMT
Hmmm... I don't know how it can help :(

> Hi Ican,
>
[quoted text clipped - 33 lines]
> > Thanks,
> > Ivan
tommieK - 13 Dec 2004 13:21 GMT
Hi Ivan,

Could you add a field to the database holding the autotext name.  Then in
VBA get the autoname (say AuthorText_3), goto the bookmark (e.g. AuthorText)
and insert the field.  You may find it best to create a single autotext file
and reference this out.

Hope this helps.

Tom

> Hi Ican,
>
[quoted text clipped - 33 lines]
> > Thanks,
> > Ivan
Ivan Debono - 13 Dec 2004 14:23 GMT
That's how I'm nearly doing it at the moment.

What I do is have a special query with sensible/readable column names. The
autotext entries are also saved in another table and has a field for the
query. So in my app I do the following:

1. Get the auottext record that matches the autotext entry I want to use in
word
2. Get the query used in autotext record and run it (passing any required
parameters)
3. Loop thhrough the recordset, setting each column in the bookmark back in
word (by matching the column names)

As I said, this works fine for simple documents but not for the complex one
that I need.

Ivan

> Hi Ivan,
>
[quoted text clipped - 44 lines]
> > > Thanks,
> > > Ivan
tommieK - 13 Dec 2004 17:25 GMT
OK, I work with similar documents.  What we do is have two tables, one with
the table name, autotext name and bookmark name.  A further table with the
table items, x-pos, y-pos within the table.  This may resolve your
performance problems, set a range and populate the x/y pos; only bookmark the
first cell in the table.

This works with large documents, although as I say its best to have one
dedicated autotext file and reference out to this.

Tom

> That's how I'm nearly doing it at the moment.
>
[quoted text clipped - 75 lines]
> > > > Thanks,
> > > > Ivan
Ivan Debono - 14 Dec 2004 09:03 GMT
This would solve the problem if the users aren't allowed to modify the
templates. But the reason why I'm using word templates is that the users are
allowed to change the templates however they like.

> OK, I work with similar documents.  What we do is have two tables, one with
> the table name, autotext name and bookmark name.  A further table with the
[quoted text clipped - 86 lines]
> > > > > Thanks,
> > > > > Ivan
Ivan Debono - 14 Dec 2004 15:45 GMT
Basically what I want to achieve is something like a report designer (take
Access as an example), where the user designs his own report. The link to
the database is over the bookmarks though.

Is it possible to achieve something like that with Word?

Ivan

> OK, I work with similar documents.  What we do is have two tables, one with
> the table name, autotext name and bookmark name.  A further table with the
[quoted text clipped - 86 lines]
> > > > > Thanks,
> > > > > Ivan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.