Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-04-2021, 09:53 AM
nyconfidential nyconfidential is offline Add a bookmark at a certain line/column Windows 10 Add a bookmark at a certain line/column Office 2019
Novice
Add a bookmark at a certain line/column
 
Join Date: Nov 2021
Posts: 4
nyconfidential is on a distinguished road
Default

Thanks for your in depth response! See attached screenshot - these are pre-built Word documents, I want to put bookmarks next to "Effective Date", "Policy Number" and "Issued to" - which are always on line 7, 8 and 9 in all of these Word documents. I have some VBA code in Excel that looks for these bookmarks and inserts data from Excel into Word based on the bookmark names. (I've inserted the bookmarks manually into a Word document and the code has worked, I just thought I could save some time by creating these bookmarks in the 100+ Word documents programmatically rather than creating them in each individual Word file). Thank you!

Quote:
Originally Posted by Guessed View Post
You need to define the locations based on how Word refers to its own structure

Word doesn't really work in terms of 'lines' since that is fluid based on a huge number of factors. 'Paragraphs' is the usual reference point.

Columns could be either talking about a page layout column or a table column. Either way, 20 is an extraordinarily large number for a real world situation. Page layout columns is another ill-defined term like 'lines' since it is also fluid. However table columns are easy to work with but you need to specify which table you are talking about.

If you want code that will work, you should post a sample document and identify what are the triggers that uniquely identify your chosen locations eg always the 3rd table, 3rd row, 20th column, 1st paragraph.
Attached Images
File Type: png sample2.PNG (33.9 KB, 17 views)
Reply With Quote
 

Tags
bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
REf Fields show Bookmark whole cell when Bookmark is created by code. pmcpowell Word VBA 2 11-16-2019 07:05 PM
Find Bookmark, move to bookmark, execute code, repeat raymm3852 Word VBA 10 04-15-2016 06:21 PM
Add a bookmark at a certain line/column Table column line moves joannechee2 Word Tables 7 03-17-2016 12:21 AM
Add a bookmark at a certain line/column Delete Line of Bookmark if the Text is Empty ljg713 Word VBA 1 12-21-2015 04:27 PM
Multi Line Bookmark streng Word 3 07-13-2009 07:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft