VBA help with Word edit picture

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





Previous by Author: Re: OT - humorous Word spelling suggestion
Next by Author: Re: A survey on Technical Communicators on Cross-Functional Teams
Previous by Thread: Re: white paper - let's try again.
Next by Thread: Re: 3-variable modeling


What this post helpful? Share it with friends and colleagues:


Sponsored Ads