TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:VBA help with Word edit picture From:Dan -dot- Mitchell -at- thrivent -dot- com To:techwr-l -at- lists -dot- raycomm -dot- com Date:Thu, 22 Jan 2004 08:57:20 -0600
Hi,
I have a macro to convert text from a mainframe screen to a picture. It
works fine except that in the "Edit Picture" mode suddenly each of the text
boxes has 6 pts. before and after, which is the Normal style. After closing
the "Edit Picture" mode, the picture has the 6 pts. before and after, not
the desired single space. To summarize, I want the picture to be single
spaced and Normal style to have 6 pts. before and after.
Here's my code.
Sub Screen_to_Picture()
Selection.Font.Name = "Courier New"
Selection.Font.Size = 9
Options.DefaultBorderLineWidth = wdLineWidth050pt
With Selection.Borders(wdBorderTop)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.ColorIndex = Options.DefaultBorderColorIndex
End With
With Selection.Borders(wdBorderLeft)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.ColorIndex = Options.DefaultBorderColorIndex
End With
With Selection.Borders(wdBorderBottom)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.ColorIndex = Options.DefaultBorderColorIndex
End With
With Selection.Borders(wdBorderRight)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.ColorIndex = Options.DefaultBorderColorIndex
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColorIndex = wdAuto
End With
With Selection.Paragraphs
.LineSpacingRule = wdLineSpaceExactly
.LineSpacing = 12
End With
Selection.Cut
Selection.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, _
Placement:=wdInLine, DisplayAsIcon:=False
End Sub
Dan
Dan Mitchell
Documentation Specialist
Financial Services Operations Training and Documentation