MPW
Well-known Member
- Joined
- Oct 7, 2009
- Messages
- 571
- Office Version
- 365
- Platform
- Windows
Hey All,
Using Office 2003 in XP.
I am using Excel to Generate a report in Word.
I am having 2 separate issues.
Problem 1. I want to underline certain words and the spaces after them.
Example: Approved By:
I can turn it bold but the underline option has eluded me.
Here is a chunk of the code:
I have tried recording a macro to do it and have rewritten it multiple times but nada. I think that it is because I am doing it from Excel but don't know for sure.
Problem 2. I am also trying to create a footer in the same document that will contain the Name of the Excel Workbook that it came from on the left side of the Footer and the "Page " & # & of Pages " & ## on the right side of the Footer.
I normally work just with Excel. Word is very a different creature. Both of these thing have really stumped me. Any help on either or both of these issues will be great. Thanks
MPW
Using Office 2003 in XP.
I am using Excel to Generate a report in Word.
I am having 2 separate issues.
Problem 1. I want to underline certain words and the spaces after them.
Example: Approved By:
I can turn it bold but the underline option has eluded me.
Here is a chunk of the code:
PHP:
Set r = wrdDoc.Range
With r.Find
Do While .Execute(Findtext:="Approved By: ", _
Forward:=True) = True
r.Font.Underline = wdUnderlineSingle
Problem 2. I am also trying to create a footer in the same document that will contain the Name of the Excel Workbook that it came from on the left side of the Footer and the "Page " & # & of Pages " & ## on the right side of the Footer.
I normally work just with Excel. Word is very a different creature. Both of these thing have really stumped me. Any help on either or both of these issues will be great. Thanks
MPW