Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bookmarks
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, -- Debra Ann |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bookmarks
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 -- PS: If this is a satisfying answer to your question and you're logged in via the Microsoft site, please click Yes to "Did this post answer the question?". Thanks. "Debra Ann" wrote: 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, -- Debra Ann |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bookmarks
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. -- Debra Ann "Cooz" wrote: 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 -- PS: If this is a satisfying answer to your question and you're logged in via the Microsoft site, please click Yes to "Did this post answer the question?". Thanks. "Debra Ann" wrote: 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, -- Debra Ann |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bookmarks
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 -- PS: If this is a satisfying answer to your question and you're logged in via the Microsoft site, please click Yes to "Did this post answer the question?". Thanks. "Debra Ann" wrote: 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. -- Debra Ann "Cooz" wrote: 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 -- PS: If this is a satisfying answer to your question and you're logged in via the Microsoft site, please click Yes to "Did this post answer the question?". Thanks. "Debra Ann" wrote: 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, -- Debra Ann |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Bookmarks
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 FilePropertiesCustom and create the property of the required name (be careful of capitalisation, and no spaces allowed...) Cheers On 11/3/06 1:11 AM, in article , "Debra Ann" wrote: 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 Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
INCLUDETEXT fields and bookmarks | Microsoft Word Help | |||
Bookmarks not working? | New Users | |||
troubleshooting hyperlink bookmarks | Page Layout | |||
Bookmarks appearing in HTML Format document links | Microsoft Word Help | |||
How to protect bookmarks | Microsoft Word Help |