Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automatically generate bookmarks in a Word document (from MS Access exported report)

Posted on 2012-03-14
7
Medium Priority
?
512 Views
Last Modified: 2012-06-13
I generate a report in Access 2007 regularly that needs to be converted to Word. No problem there.

I also have a standard/template set of Powerpoint slides that need to hyperlink directly to specific pages in that Word document.

My thought is to generate the report in Access, export to Word and run some sort of code that will automatically go through word looking for the first line in the report (which contains the customer name) to create a bookmark at the customer name that is the customer's name with spaces removed. The customer names rarely change (so my PowerPoint hyperlinks should be able to point to the same bookmarks in the word document, no problem), it's just the metadata for the customer that changes.

I thought the geniuses here at Experts could tell me if there is a better way of accomplishing my goal (which is to automatically regenerate the bookmarks every time in my report)... perhaps something I could put in the database to create the bookmark?

If you think the Word code is the best bet, I need help creating that code; i have no idea how to create a bookmark in code.

Thanks!
0
Comment
Question by:epuglise
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37722277
Anytime I can create a solution that keeps everything "All in the Family" (Use 1 Office App), The easier it becomes. (again, for me at least)

You can create a Report in Access that has click-able Hyperlinks (In Report View Only)
Then send that link to the appropriate PP file.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37722313
Something like this:
Database98.mdb
0
 

Author Comment

by:epuglise
ID: 37722328
checking out the db... in the meantime i had started the following response:

I would love to eliminate a step and keep it all in one app. Let me make sure I am clear about the direction of linking and then find out more about your solution.

The Powerpoint slides have links that open the word document at a particular location.
If the power point slides were to have links to the Access Report, how do i create the "goto" place in Access?

If the links in Powerpoint go to the report in Access, what format is the Access report in... or do the links from powerpoint have to open Access, run the report, then find the correct data item?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:epuglise
ID: 37722339
Ok I see your report drives the powerpoints opening.  I need the reverse-- the powerpoint slides have links that open the access report (saved as a .doc) to a particular page...
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 1500 total points
ID: 37722497
This is a Word macro:
Sub FindCust()
    Dim rng As Range
    
    Set rng = ActiveDocument.Range
    With rng.Find
        .Text = "MyCustomer"
        If .Execute Then
            ActiveDocument.Bookmarks.Add "bmkCustomer", rng
        End If
    End With
    
End Sub

Open in new window

0
 

Author Comment

by:epuglise
ID: 37722512
Thanks Graham.... So I have 100 customers in this report-- would you recommend any efficiencies to the code snipped you gave me or should i just repeat the snippet above 100 times and replace the find text and bookmark with the appropriate customer name? (I'm wondering if there's a way to do it with CASE but I'm not a great coder...)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37722982
GrahamSkan,

I'll let you take this from here...

;-)

Jeff
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question