Re: Testing a text file in Word Macro by Mushy
Mushy
Wed Apr 18 08:47:29 CDT 2007
On 16 Apr, 17:38, "Jonathan West" <j...@mvps.org> wrote:
> "Mushy" <mushtaq.netdevelo...@gmail.com> wrote in message
>
> news:1176725924.258116.133600@o5g2000hsb.googlegroups.com...
>
> > Hi Guys,
>
> > Can any one give suggestions on it please? Ours is a big organisation
> > with almost 100 printer. I have written macro which checks the driver
> > name and assign the different trays. I have written if statements for
> > each printer but in the future if new printers are added I dont want
> > MAcro to be changed much. So I think it will be good if I store all
> > the printer details as atextfileand test with driver name and
> > Assign the tray numbers.
>
> > Actual Requiremenet: I just want to know how do we test a particular
> > column of atextfilein a Word Macro
>
> > Anyone please
>
> Hi Mushy
>
> There are various options here. The simplest is to use the basicfilei/o
> commands to get thetextof thefileinto a string variable, and then
> manipulate the variable. Take a look at the following commands in theVBA
> Help
>
> Open
> Line Input
> Input #
> Get #
>
> --
> Regards
> Jonathan West - Word MVPwww.intelligentdocuments.co.uk
> Please reply to the newsgroup
> Keep yourVBAcode safe, sign the ClassicVB petitionwww.classicvb.org
Thanks Jonathan,
I will look at it