Re: add an inventory item to a word doc if there is a Y in column C

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: fitful_thought (cascando_at_legs.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 10:59:07 +1000

That's useful.

Thanks.

DL

"keepITcool" <xrrcvgpbby@puryyb.ay> wrote in message
news:Xns952B1236FE613keepitcoolnl@207.46.248.16...
>
> why do you post a procedure that is intended for email,
> while you want to work with Word NOT Outlook?
>
> search google on "excel export word"
> and you should find a more appropriate example.
>
> try for instance here:
> http://www.erlandsendata.no/english/index.php?d=envbaolecontrolword
>
>
>
> keepITcool
>
> < email : keepitcool chello nl (with @ and .) >
> < homepage: http://members.chello.nl/keepitcool >
>
>
> "fitful_thought" <cascando@legs.com> wrote:
>
> > Hi,
> >
> > This code from ron de bruin sends an e-mail to each address in column
> > B if there is a Y in column C.
> >
> > For Each cell In
> > Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
> > If cell.Offset(0, 1).Value <> "" Then
> > If cell.Value Like "*@*" And cell.Offset(0, 1).Value = "y"
> > Then
> > Set OutMail = OutApp.CreateItem(olMailItem)
> > With OutMail
> > .To = cell.Value
> > .Subject = Cells(1, 4)
> > .Body = "Dear " & cell.Offset(0, -1).Value & "," &
> > vbNewLine & vbNewLine & strbody
> > 'You can add other files also like this
> > '.Attachments.Add ("C:\test.txt")
> > .Display
> > '.Send 'Or use Display
> > End With
> > Set OutMail = Nothing
> > End If
> > End If
> > Next cell
> >
> > If column B contained an inventory list, could the above code be
> > amended to add an inventory item to a word doc if there is a Y in
> > column C?
> >
> > Thanks in advance for any assistance.
> > DL
> >
> >
> >
>


Quantcast