MS Word macros - 2 macros
Budget $15-25 AUD / hour
- Freelancer
- Jobs
- Word
- MS Word macros - 2 macros
Macro 1 - Format Table
We use an MS Word template to create reports for our clients. Part of the report is a table with an asset list (4 columns. The number of rows is different for each report depending on the number of assets). I would like a macro written that can be used to format the table so it does not have to be done manually for each report. I would just highlight the table, select the macro and it will format the table automatically:
The table format macro needs to format the table as follows:
1. Borders (bottom borders of each row)
2. Font (News Gothic MT)
3. Font size (11)
4. Colour (Red:89, Green: 89, Blue: 89; Hex:#595959)
4. Specify row height of At least 0.57cm
5. Header row should be bolded
6. Columns 1-3 should be left aligned, the 4 column should be centre aligned
7. Repeat Header Row at the top of each page
8. Vertical Alignment for each cell should be Center
I've attached an example of a correctly formatted table.
Macro 2 - Colour code cells
In the attached example file, you will note that column 4 is colour coded. I have written a macro that colour codes these cells depending on the number written in the cell.
1 : Green
2 : Orange
3 : Yellow
4 : Red
The macro works OK, however for a very long asset list, it takes a long time and often results in Word (or the PC) hanging or crashing. I would like the macro re-written so that it runs more efficiently. The code should be tested with at least 90 rows. The code for the macro is:
Sub colourSelectedTable()
Dim c As [login to view URL]
If [login to view URL](wdWithInTable) Then
For Each c In [login to view URL](1).[login to view URL]
If IsNumeric(Left([login to view URL], Len([login to view URL]) - 1)) Then
If Val([login to view URL]) = 1 Then
[login to view URL] = wdColorRed
ElseIf Val([login to view URL]) = 2 Then
[login to view URL] = wdColorOrange
ElseIf Val([login to view URL]) = 3 Then
[login to view URL] = wdColorYellow
ElseIf Val([login to view URL]) = 4 Then
[login to view URL] = RGB(146, 208, 80)
Else
[login to view URL] = wdColorWhite
End If
Else ' set non-numeric to White
[login to view URL] = wdColorWhite
End If
Next
End If
End Sub
Sub Macro1()
'
' Macro1 Macro
'
'
End Sub
Awarded to:
7 freelancers are bidding on average $21/hour for this job
Hello client, I am an senior automation developer with VBA expertise. I would be able to support you to work on the project. let contact and discuss. Best regards, Binh
I can develop macros to automate your tasks. Like: Reading data from Excel or CSV File and preparing designs of powerPoint slides Customized powerpoint bullets Getting data from different Excel sheets and preparing More
I m data entry expert,and I m the ones what are you looking for this project because I have good speed And do your work within a time with perfectly,so,just give me a chance to make you happy with my work.
Dear Hiring Manager, Greetings from Denys ,hope your day is going well and all is good with you. We would like to discuss the project in details before confirming the bid, so kindly let me know when you are available.