Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-07-2021, 11:27 PM
gmayor's Avatar
gmayor gmayor is offline Help with bookmarks in word. Windows 10 Help with bookmarks in word. Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,143
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Frankly I have no idea what it is that you are trying to do, not helped by my unfamiliarity with Spanish.

Your 'What I Want' document seems to bear no relationship to your template, and trying to work with a PDF file of data is not really practicable. I would start by opening that PDF in Word and save it as a document. You can then populate your userform combobox as follows:


Code:
Dim oDoc As Document
Dim oTable As Table
Dim oRng As Range
Dim sName As String

    Set oDoc = Documents.Open(ThisDocument.Path & "\TERMINOS Y KILOMETROS.docx")
    For Each oTable In oDoc.Tables
        Set oRng = oTable.Cell(1, 1).Range
        oRng.End = oRng.End - 1
        sName = Split(oRng.Text, " ")(0)
        cbovia.AddItem sName
    Next oTable

As for the rest it is anyone's guess what you want. However if you have the converted data document open you can interrogate the tables to get what information you want for your document.


I would suggest that you use content controls, rather than bookmarks which are easily deleted.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving a word doc as a pdf with bookmarks MimiCush Word 10 03-26-2018 01:51 PM
Help with bookmarks in word. Deleting only all bookmarks contents not the bookmarks adilprodigy Word VBA 1 10-11-2017 01:31 PM
Help with bookmarks in word. Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM
Help with bookmarks in word. selecting ms word bookmarks using vba dnc Word VBA 4 05-10-2013 04:58 PM
word 2007 bookmarks Dawn Word 0 07-14-2009 01:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:14 AM.


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