![]() |
#7
|
||||
|
||||
![]()
Hi chipnputt,
I've had a quick look at your 'ExportToWord' sub. There are some odd things there, plus some inefficiencies that could be improved upon. For example: 1. Why do you have: Code:
If Err.Number <> 0 Then 'Word isn't already running End If Code:
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True ActiveDocument.Unprotect 2. The code: Code:
If i = 2 Then DaySheet = "Monday" End If If i = 3 Then DaySheet = "Tuesday" End If If i = 4 Then DaySheet = "Wednesday" End If If i = 5 Then DaySheet = "Thursday" End If If i = 6 Then DaySheet = "Friday" End If If i = 7 Then DaySheet = "Saturday" End If Code:
Select Case i Case i = 2: DaySheet = "Monday" Case i = 3: DaySheet = "Tuesday" Case i = 4: DaySheet = "Wednesday" Case i = 5: DaySheet = "Thursday" Case i = 6: DaySheet = "Friday" Case i = 7: DaySheet = "Saturday" End Select Code:
Worksheets(DaySheet).Activate Worksheets(DaySheet).Range(BmTeamName).Select Selection.Copy Code:
Worksheets(DaySheet).Range(BmTeamName).Copy
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rockwellsba | Word VBA | 2 | 05-31-2011 01:07 AM |
Help with PPT AddIn that pastes slides into another presentation | matt.wilson | PowerPoint | 0 | 01-05-2011 03:28 PM |
Controlling Style when a user pastes into a form | Cris0205 | Word | 0 | 08-05-2010 04:33 PM |
![]() |
JohnGalt | Outlook | 2 | 08-05-2010 09:06 AM |
Word only pastes plain text | seskanda | Word | 6 | 02-19-2010 10:01 AM |