Prev: TextBox control not enabled with protection on
Next: Keeping a table in a form editable and checking that fields are filled in before allowing a save
From: OKLover on 2 Jun 2010 01:43 Dear All, I wonder if any property or method could to check the current document content is selected all or not? Many thanks David
From: Graham Mayor on 2 Jun 2010 02:14 If you mean all as in the context of using CTRL+A then If Selection.Range.Start = ActiveDocument.Range.Start And _ Selection.Range.End = ActiveDocument.Range.End Then MsgBox "The document is selected" Else MsgBox "Only part of the document is selected" End If would do that, but it would be better to assign a range rather than a selection and then you would not need to make the test. Set oRng = ActiveDocument.Range -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "OKLover" <OKLover(a)discussions.microsoft.com> wrote in message news:A3F8A9E9-3040-4A70-990E-0E671B3468EE(a)microsoft.com... > > Dear All, > > I wonder if any property or method could to check the current document > content is selected all or not? > > > > Many thanks > > David
From: OKLover on 2 Jun 2010 04:57 Thanks! Graham Mayor. :D "Graham Mayor" wrote: > If you mean all as in the context of using CTRL+A then > > If Selection.Range.Start = ActiveDocument.Range.Start And _ > Selection.Range.End = ActiveDocument.Range.End Then > MsgBox "The document is selected" > Else > MsgBox "Only part of the document is selected" > End If > > would do that, but it would be better to assign a range rather than a > selection and then you would not need to make the test. > Set oRng = ActiveDocument.Range > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > > "OKLover" <OKLover(a)discussions.microsoft.com> wrote in message > news:A3F8A9E9-3040-4A70-990E-0E671B3468EE(a)microsoft.com... > > > > Dear All, > > > > I wonder if any property or method could to check the current document > > content is selected all or not? > > > > > > > > Many thanks > > > > David > > > . >
From: Graham Mayor on 2 Jun 2010 05:05
You are welcome :) -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "OKLover" <OKLover(a)discussions.microsoft.com> wrote in message news:335C0D4C-E818-4C23-852D-50AE1DE346DA(a)microsoft.com... > > Thanks! Graham Mayor. :D > > > > > "Graham Mayor" wrote: > >> If you mean all as in the context of using CTRL+A then >> >> If Selection.Range.Start = ActiveDocument.Range.Start And _ >> Selection.Range.End = ActiveDocument.Range.End Then >> MsgBox "The document is selected" >> Else >> MsgBox "Only part of the document is selected" >> End If >> >> would do that, but it would be better to assign a range rather than a >> selection and then you would not need to make the test. >> Set oRng = ActiveDocument.Range >> >> -- >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> Graham Mayor - Word MVP >> >> My web site www.gmayor.com >> Word MVP web site http://word.mvps.org >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> >> >> "OKLover" <OKLover(a)discussions.microsoft.com> wrote in message >> news:A3F8A9E9-3040-4A70-990E-0E671B3468EE(a)microsoft.com... >> > >> > Dear All, >> > >> > I wonder if any property or method could to check the current document >> > content is selected all or not? >> > >> > >> > >> > Many thanks >> > >> > David >> >> >> . >> |