Anyone know how to program macros in Outlook 2007?
I have a macro for Word that I use to paste screen shots (copy text from green screen and paste into emails) as it is smaller than emailing images, and the text can then also be copied at the other end.
In word this creates a 1 cell table, pastes the text into the table, shades the table background grey, puts a thin border on the table, changes the font to courier new (to preserve green screen formatting) and make it font size 10.
When we changed to outlook 2007 from 2003 it was no longer available.
Anybody know how to convert the below word 2007 macro for use in outlook?
I have a macro for Word that I use to paste screen shots (copy text from green screen and paste into emails) as it is smaller than emailing images, and the text can then also be copied at the other end.
In word this creates a 1 cell table, pastes the text into the table, shades the table background grey, puts a thin border on the table, changes the font to courier new (to preserve green screen formatting) and make it font size 10.
When we changed to outlook 2007 from 2003 it was no longer available.
Anybody know how to convert the below word 2007 macro for use in outlook?
PHP Code:
Sub TextBox()
//'
//' TextBox Macro
//' Recorded by Greg Craill 14/11/2010
//' Pastes the selected text into a text box and formats it as a screen shot type.
//'
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
1, 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
With Selection.Tables(1)
.TopPadding = CentimetersToPoints(0.2)
.BottomPadding = CentimetersToPoints(0.2)
.LeftPadding = CentimetersToPoints(0.2)
.RightPadding = CentimetersToPoints(0.2)
.Spacing = 0
.AllowPageBreaks = True
.AllowAutoFit = True
End With
Selection.Tables(1).AutoFitBehavior (wdAutoFitContent)
Selection.PasteAndFormat (wdPasteDefault)
Selection.TypeBackspace
Selection.Tables(1).Select
Selection.Font.Name = "Courier New"
Selection.Font.Size = 10
Selection.Font.Color = -587137025
Selection.Shading.Texture = wdTextureNone
Selection.Shading.ForegroundPatternColor = wdColorAutomatic
Selection.Shading.BackgroundPatternColor = -603923969
Selection.MoveDown Unit:=wdLine, Count:=1
End Sub
Comment