ashleyyoung
Member
- Outlook version
- Email Account
- Exchange Server
Hi There
I hope someone can help with this? I would like the following Macro that was recorded in Word 07 to work in Outlook 07...
Sub QA()
'
' QA Macro
'
'
Selection.TypeParagraph
Selection.TypeText Text:="We have made the following booking for you:"
Selection.TypeParagraph
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=3, NumColumns:= _
2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False
End With
Selection.TypeText Text:="Date:"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeText Text:="Time:"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeText Text:="Location:"
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeText Text:= _
"PLEASE NOTE: If the above date/time is not what you have req"
Selection.TypeText Text:= _
"uested this is because the requested date/time has been take"
Selection.TypeText Text:= _
"n and the above details are for the next available slot."
Selection.TypeParagraph
Selection.TypeText Text:= _
"Cancellations can only be made up to 24 hours before the boo"
Selection.TypeText Text:= _
"ked slot. Please contact us either by emailing 'CC Business "
Selection.TypeText Text:= _
"Support' or by telephoning 8708 as soon as possible. For can"
Selection.TypeText Text:= _
"cellations outside of this 24 hour cut off, please contact '"
Selection.TypeText Text:= _
"CC Business Support' and the chair of that QA Panel."
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeText Text:="Thank you"
Selection.TypeParagraph
Selection.TypeText Text:="Business Support Team"
End Sub
Can anyone help as at the moment it's not working and I think I'm missing something really obvious.
Thank you
I hope someone can help with this? I would like the following Macro that was recorded in Word 07 to work in Outlook 07...
Sub QA()
'
' QA Macro
'
'
Selection.TypeParagraph
Selection.TypeText Text:="We have made the following booking for you:"
Selection.TypeParagraph
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=3, NumColumns:= _
2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False
End With
Selection.TypeText Text:="Date:"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeText Text:="Time:"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeText Text:="Location:"
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeText Text:= _
"PLEASE NOTE: If the above date/time is not what you have req"
Selection.TypeText Text:= _
"uested this is because the requested date/time has been take"
Selection.TypeText Text:= _
"n and the above details are for the next available slot."
Selection.TypeParagraph
Selection.TypeText Text:= _
"Cancellations can only be made up to 24 hours before the boo"
Selection.TypeText Text:= _
"ked slot. Please contact us either by emailing 'CC Business "
Selection.TypeText Text:= _
"Support' or by telephoning 8708 as soon as possible. For can"
Selection.TypeText Text:= _
"cellations outside of this 24 hour cut off, please contact '"
Selection.TypeText Text:= _
"CC Business Support' and the chair of that QA Panel."
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeText Text:="Thank you"
Selection.TypeParagraph
Selection.TypeText Text:="Business Support Team"
End Sub
Can anyone help as at the moment it's not working and I think I'm missing something really obvious.
Thank you
