BuiltIn Dialog Bugs

J

John Korchok

I'm trying to incorporate a modified Tools/Labels and Envelopes command that
will format the labels and envelopes. I am working with a lowest common
denominator of Word 97. None of the commands that are supposed to set the
dimensions for the label and envelope work. I got so frustrated, I put in
almost all the available parameters to see which worked and which had no
effect on the dialog as displayed. As you can
see from my code, I have tried a variety of number formats. I can't get any
to work, the dialog comes up with the auto values for placement of the
return address, label size, etc. MsgBoxes reveal that the values hold, they
just have no effect on the dialog box, which continues to display the
automatic values.

I have been working with the WordBasic help file, but much of the useage for
parameter has changed and there are a couple of commands that are new. None
of these commands has any noticeable effect on the dialog except for the
ones noted.

Set EnvLblDlg = Dialogs(wdDialogToolsEnvelopesAndLabels)
With EnvLblDlg
'The following work as expected
.EnvPaperSize = 3
.SingleLabel = 1
.LabelRow = 2
.LabelColumn = 2
.LabelDotMatrix = 0
.LabelTray = 0
.LabelListIndex = 5
.LabelIndex = 3
.EnvOmitReturn = 1
'The following work conditionally
.ExtractAddress = 1 'This works only if RetAddrText is used
.RetAddrText = "Text" 'This works only if Extract Address is on
.EnvReturn = "Text" 'This works only if RetAddrText and
ExtractAddress is not used
'The following seem to have no effect on the displayed dialog
.EnvHeight = 2
.EnvWidth = 2
.UseEnvFeeder = 0
.PrintFIMA = 1
.EnvAddress = "Text"
.CustomName = "Text"
.LabelAcross = 1
.LabelDown = 1
.LabelTopMargin = InchesToPoints(0)
.LabelSideMargin = InchesToPoints(0)
.LabelHeight = PointsToInches(288)
.LabelWidth = PointsToInches(432)
' .RetAddrFromLeft = PointsToInches(68) 'I've tried a variety of
way of entering the value, but none of them work.
.RetAddrFromLeft = "0.94" + Chr(34)
' .RetAddrFromLeft = "0.94 in"
' .RetAddrFromLeft = "0.94"
.RetAddrFromTop = "0.89 in"
If .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabLabels Then
'Distinguish between labels and envelopes
.AddrFromLeft = "0.94 in"
.AddrFromTop = "1.31 in"
Else
.AddrFromLeft = "3.79 in"
.AddrFromTop = "1.5 in"
End If
Select Case .Display 'Distinguish between Print and Add to
Document buttons
Case 1
If .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabLabels
Then
.AddrFromLeft = "0.94 in"
.AddrFromTop = "1.31 in"
Else
.AddrFromLeft = "3.79 in"
.AddrFromTop = "1.5 in"
End If
.Execute
Case 2
If .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabLabels
Then
.AddrFromLeft = "0.94 in"
.AddrFromTop = "1.31 in"
Else
.AddrFromLeft = "3.79 in"
.AddrFromTop = "1.5 in"
End If
.Execute
Case Else
End Select
End With


--

John Korchok

Word Lab Systems, Inc.
www.wordlab.ca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top