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)


[login to view URL] = wdColorWhite

End If

Else ' set non-numeric to White

[login to view URL] = wdColorWhite

End If


End If

End Sub

Sub Macro1()


' Macro1 Macro



End Sub

Skills: Word, Visual Basic, Microsoft Office

See more: avoid watermark cover page ms word, macros run ms word version , open visual basic macros ms word mac, pdf ms word data conversion job page, pdf ms word data conversion page , hire a candidate who can write macros in ms word, Earn upto 1$ per page typing (Pdf to Ms-word), Earn upto US$1 per page typing (Pdf to Ms-word), Earn upto US$1 per page typing (Pdf to Ms-word) , Restyle 200 page MS Word document , Create MS word worksheets from PDFs - 2, 2 corinthians 9 6 8, how to write 1/2 in ms word, ms word cover page designs free download, project front page design in ms word, 4,2,4,8,6,8,16, ms word mail merge labels only one page, codecanyon novi v0 8.6 html page builder & visual content editor, 2 page resume format download in ms word, codecanyon novi v0 8.6 html page builder visual content editor

About the Employer:
( 0 reviews ) Como, Australia

Project ID: #28139561

Awarded to:

(6 Reviews)

7 freelancers are bidding on average $21/hour for this job

(15 Reviews)
(15 Reviews)

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

$20 AUD / hour
(5 Reviews)

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

$20 AUD / hour
(0 Reviews)

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.

$20 AUD / hour
(0 Reviews)

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.

$20 AUD / hour
(0 Reviews)