Re: determine table cell value by JerryMB
JerryMB
Thu Jan 19 20:13:02 CST 2006
Thanks Doug that is cleaner than the method I used -- Basicly
strMystr2= Mid(strMystr,1,(Len(strMystr)-2)
--
JerryB
"Doug Robbins - Word MVP" wrote:
> That will include the end of cell marker in myString. To exclude it, use
>
> Dim myrange as Range
> Set myrange = ActiveDocument.Tables(1).Cell(2, 2).Range
> myrange.End = myrange.End - 1
> MsgBox myrange
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "JerryMB" <JerryMB@discussions.microsoft.com> wrote in message
> news:97BFB6BD-23A3-4388-898D-1E36FCE2B8DC@microsoft.com...
> > Found it in a earlier discussion - must be my bad search technique
> >
> > myString = ActiveDocument.Table(1).Cell(2,2).Range.Text
> >
> >
> > --
> > JerryB
> >
> >
> > "JerryMB" wrote:
> >
> >> I have done vba in access and excel but in word I can't seem to get this
> >> right probably because it is right in front of my face.
> >>
> >> How do I use the value from a word table cell in a macro?
> >>
> >> The value of cell (1,1) will determine an action on cell(1,2) of table(1)
> >> and the value of Cell (1,1) needs to be displayed in a msgbox.
> >>
> >>
> >> --
> >> JerryB
>
>
>