Re: how do a toggle in Word 6? by Larry
Larry
Mon Oct 13 14:03:42 CDT 2003
I'll try it when I get to the other computer later, but from what you
said it looks kind of doubtful, Klaus. :-)
Is a toggle in Word 6 realy so much more complicated than in Word 97?
Larry
"Klaus Linke" <fotosatz_kaufmann@t-online.de> wrote in message
news:uStz6#akDHA.3688@TK2MSFTNGP11.phx.gbl...
> "Larry" <larry328@att.net> wrote:
> > This macro in Word 97 toggles the blue screen off and on:
> >
> > Sub BlueScreenToggle()
> > Options.BlueScreen = Not (Options.BlueScreen)
> > End Sub
> >
> > What would be the equivalent code for Word 6?
>
>
> Hi Larry,
>
> It's been a couple of years that I wrote my last WordBasic macro, but
it
> should be
>
> Dim Dlg As ToolsOptionsGeneral
> GetCurValues Dlg
> Dlg.BlueScreen = Abs(Dlg.BlueScreen - 1)
> ToolsOptionsGeneral Dlg
>
> ... I hope. Had to translate from the German WordBasic.
>
> ToolsOptionsGeneral.BlueScreen was 1 for "True" and 0 for "False".
> Usually, True corresponds to -1.
> Thus the clumsy calculation: Abs(0-1)=1, Abs(1-1)=0.
> You could devise several expressions to get around that... say
> Dlg.BlueScreen = - Not(- Abs(Dlg.BlueScreen)) would work, too.
>
> Klaus
>