Bookmarks

G

Guest

I am trying to autopopulate a table cell from another application
(Documentum). This is how I do it:

1. Highlight the cell in the table.
2. Insert, bookmark, name the bookmark, and add to make a bookmark field.
3. The visual basic software looks for the name of the bookmark and
autopopulates the field.

One of the bookmark fields is called "originator" and it works in about four
different templates that I have but all of a sudden it doesn't work in
another template. There are no errors in the name of the bookmark field, the
cell font color is not white, and I even searched the bookmark to make sure
it was a field and not just a regular bookmark and it is.

Any idea on why it wouldn't work one out of four times?

Thanks,
 
G

Guest

Hi Debra Ann,

Are you getting any further when you debug? Open the macro in the
VBA-editor, and place a breakpoint on the first line of your code by clicking
in the vertical grey bar on the left. Run your code and the macro will stop
at this point.

Now arrange the windows on your screen so that both the code window and the
cell that should be populated are visible. Activate the VBA-editor and press
F8 to execute one line of code at a time. Can you see what happens?

What also crossed my mind: after the macro has run, select the cell, press
Shift-left arrow to select only its contents and press Ctrl-C to copy them to
the clipboard. Paste the clipboard elsewhere in your document to view the
exact contents of the cell.

If you set an exact row height, not all cell contents may be visible. If
they somehow get preceded by, say, tabs or a paragraph mark, the cell may
appear to be empty.

Good luck,
Cooz
 
G

Guest

Cooz,

I mentioned this to the VB person. I created the template and the IT person
created the code the pushes the information into the word document when it is
open. I did try to cut and paste but there was nothing there. Thanks for
the ideas.
 
G

Guest

Hi Debra Ann,

What you always can do, is rebuild the fifth template, based on one of the
four in which the code works fine.
Be sure to leave the table(cell) intact when you re-create the template.

This may be a bit of work of course, but at least you will have your problem
solved.

Good luck,
Cooz
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi DebraAnn:

We need to hear from the guy who wrote the code :)

Is the code, by any chance, "populating" document properties to which you
have "linked" bookmarks?

In which case, your error is that although the bookmark exists in the
troublesome template, the Document Property to which it is supposed to be
linked does not exist. The VBA code should return an error number when it
tries to populate that property: give us that and we can probably nail it
for you.

If that's the problem, the solution is simply to hop into
File>Properties>Custom and create the property of the required name (be
careful of capitalisation, and no spaces allowed...)

Cheers


Cooz,

I mentioned this to the VB person. I created the template and the IT person
created the code the pushes the information into the word document when it is
open. I did try to cut and paste but there was nothing there. Thanks for
the ideas.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top