BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Creating over 50 pages from data in Excel Document

Started by cstewart28, May 05, 2016, 02:55:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I need to create network maps for over 50 IP video cameras.  I have all the data in the Excel document, but need to figure out how to pull it out since it is not really tied to a specific shape.  I have 3 different network maps that I have put out as background pages.  I then made 3 templates with text and pictures where I need the information filled in at. 

I made a macro that copies all the data from one of the templates to a new file and then adjusted the macro to work on a button click action.  Its crude but it works. 

I need help figuring out how to get the Excel data into the correct items.  Each item is a column in the Excel files, CameraID, CameraDescription, etc. So I need to connect to the excel file and based on the connection query like where background equal 2 (using the template with background 2).  Make a new page for each new row based on CameraID.   

   Dim strPage As String
    strPage = "1002"
    Dim CameraID As String
    CameraID = strPage
    Dim CameraDescription As String
    CameraDescription = "CCTV #21 - Raceway Body/Eng.Ctr"
    Dim Location As String
    Location = "Body Shop"
    Dim IDF As String
    IDF = "IDF Cabnet"
    Dim SWNumber As String
    SWNumber = "Switch Number"
    Dim PortNumber As String
    PortNumber = "23"
    Dim IDFCabnet As String
    IDFCabnet = "Cabnet 2"
    Dim PatchPanel As String
    PatchPanel = "Patch Panel"
    Dim PatchPortNumber As String
    PatchPortNumber = "23"
    Dim PIQEVNumber As String
    PIQEVNumber = "QEV1131AGYDGS"

Thanks for any help, I have attached the vsd file, so you can see what I'm trying to do.


Hi cstewart,
It is not clear how your scenario is supposed to work. Create all three pages for each row, or is a specific template linked to a type of row. I couldn't find a matching column in your data.

Anyway, your problem is to extract the fields of the different columns of each row and distribute them over the drawing.
You could do this by using simple and honest VBA code.
I opted however for a tool I wrote some time a ago (
This simplifies the extraction of the data.
One could also have used annotation shapes.
The key is to have one shape associated to one row in the data table.
I showed the process in a small video on youtube (

Next steps:
Either you create the pages manually as shown in the video, or you write a macro to iterate over all the rows of the data table, allocate a new value to the "data container", duplicate the template page, rename it.
You'll get all the necessary commands, if you record a macro while doing these steps manually.
I checked that all the commands are really displayed in the macro.

HTH and best regards,

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 159 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1053KB.
Tokens: post-login.
Cache hits: 13: 0.00140s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]