-1

I have a grid that is set up as A1, A2, B1, B2, B3 etc. Rows run from A...Z and also AA to KG and the columns range from 1 to 1000.

Thanks to @Jim K in LibreOffice Draw -add hyperlinks based on query table we can add the hyperlinks from 1 to 1000 but I am not sure how to embed a second loop that does this?

I will be easiest if we could supply a CSV that has

A1, map_A1.pdf
A2, map_A2.pdf
FG89, map_FG89.pdf

This makes sure only the text we want is hyperlinked and it can deal with any complexity of file names. Match should be exact as well.

Community
  • 1
  • 1
GeorgeC
  • 956
  • 5
  • 16
  • 40

1 Answers1

1

To loop through letters, for example A to Z:

Sub chars_loop
    Dim cval, c
    For cval = Asc("A") to Asc("Z")
       c = Chr(cval)
       Print(c)
    Next cval
End Sub

As far as reading from a CSV file, there are two ways to read from files:

For an example of the latter, see Andrew Pitonyak's macro document section 5.13. You could loop through all lines in the file with Do While Not EOF(iNum).

Jim K
  • 12,824
  • 2
  • 22
  • 51
  • I finally got back to this project. There is an updated pdf that has quite complex grid labeling at the following link. How can I get the text linked to relative pdf's? the maps will be like DSC_A1.pdf etc https://drive.google.com/open?id=0BxjBqNsSHofKUC1KU3RITVpQZ0E – GeorgeC Feb 26 '16 at 12:36