![]() |
|
|
|
#1
|
|||
|
|||
|
Thank you for fixing the first part of that script Geoff G. It works great so far.
My apologies to both of you for not explaining this better. The table in the Word Doc contains the following 7 columns: UserID, AP Name, AP Group, Model, Mounting, MAC Addr, Notes These columns are where the output pulls the information from. The items in the output in " " need to be pulled from the column tables. Here is what the output template looks like: provision-ap copy-provisioning-params ap-name "«MAC_Addr»" provision-ap installation default provision-ap no external-antenna provision-ap server-name aruba-master provision-ap ap-group "«AP_Group»" provision-ap ap-name "«AP_Name»" provision-ap no syslocation provision-ap no remote-ap provision-ap no fqln provision-ap reprovision ap-name "«MAC_Addr»" Here is an example of the first two rows: provision-ap copy-provisioning-params ap-name 9c:1c:12:c5:a6:c8 provision-ap installation default provision-ap no external-antenna provision-ap server-name aruba-master provision-ap ap-group PollockLocal2-PollockHalls provision-ap ap-name UP.Beaver-AP003 provision-ap no syslocation provision-ap no remote-ap provision-ap no fqln provision-ap reprovision ap-name 9c:1c:12:c5:a6:c8 provision-ap copy-provisioning-params ap-name 9c:1c:12:c5:a0:78 provision-ap installation default provision-ap no external-antenna provision-ap server-name aruba-master provision-ap ap-group PollockLocal2-PollockHalls provision-ap ap-name UP.Beaver-AP004 provision-ap no syslocation provision-ap no remote-ap provision-ap no fqln provision-ap reprovision ap-name 9c:1c:12:c5:a0:78 I would need the script to create an output like the ones above for each row in the table. Some of these tables can easily be a couple hundred rows. Thank you both again very much for your help! |
|
#2
|
|||
|
|||
|
I am not sure the attached is what you want, but have a look.
Data in your table is output to a new Word document in the format you describe. If a row in your table does not contain a valid MAC address in the Notes column, that row is skipped in the output document. The number at the end of line 6 is increased by one for each block of text. If a row is skipped in your table, a number is NOT skipped in the output file. That can be changed if required. If the format is wrong, please say what you need. |
|
#3
|
|||
|
|||
|
On reviewing your table, I have realised that you want the AP Name and AP Group taken from columns 2 and 3. (At least, I think you do.)
The VBA macros in the attached document do just that. Incidentally, there was a programming error in the error handler in the previous versions I posted: I put Err.No instead of Error.Number. I have corrected that in the attached version. Are the macros now doing what you want? |
|
#4
|
|||
|
|||
|
Your work saved me hours. Thank you so much for your contribution. I was able to learn and make modification to your script to make changes that work for my data.
Thank you Geoff G. |
|
#5
|
|||
|
|||
|
Very many thanks for your feedback - it's nice to know one's efforts are appreciated.
I think a documented code example is an easier way to get to grips with something (rather than, say, a wordy explanation), but they do take some work to put together. I'm glad you were able to adapt the code to meet your objectives. Geoff |
|
#6
|
|||
|
|||
|
how can i access the code to edit it? Can someone me please!
Last edited by arelone; 05-03-2015 at 04:26 PM. |
|
#7
|
|||
|
|||
|
hi,
this file work great, but can you help me create one for the criteria below: provision-ap read-bootinfo ap-name "18:64:72:c6:07:5e" provision-ap copy-provisioning-params ap-name "18:64:72:c6:07:5e" provision-ap installation indoor provision-ap a-ant-gain 6 provision-ap g-ant-gain 4 provision-ap ap-group "8236" provision-ap ap-name "8236_AP012" provision-ap syslocation "Attendance Office, Main Building 1st Fl" provision-ap reprovision ap-name "18:64:72:c6:07:5e" clear provisioning-ap-list i need one to populate syslocation |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA Code to take data from a table in word document and place it in a summary table
|
VBLearner | Word VBA | 1 | 03-09-2014 08:42 PM |
Pull address from Outlook into Word
|
SteveM5000 | Word | 3 | 05-11-2012 07:00 PM |
| Excel VBA: Pull data from web | tinfanide | Excel Programming | 0 | 12-09-2011 02:11 AM |
| Pull Outlook Meeting Information into Word | alhare | Word | 0 | 02-01-2011 12:51 PM |
macro to pull data from multiple files
|
psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |