Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recommendations Please
#1
Looking for a recommendation on how best to accomplish the following:

What I would like would be a similar function to the objFSO.OpenTextFile in Visual Basic (do until … AtEndOfStream), whereby I can open a file, grab the first text line (the client name) then loop down through a specific process, grab the next name and repeat till the end of the text file is reached. The process I want to create is further automation of opening up monthly service orders for our clients. The text file would contain the names of the clients who are billed monthly or semi monthly. My current macro, which works very well, begins in the client record. Upon pressing the hot keys it opens a new Service Order and fills in all the necessary fields with various necessary generic text for that month. Currently I have to open the client record manually first. Once the client record is open I simply use the [Alt][F2] hot keys to create the new monthly SO. I modify the macro each month changing the month name, the date stamp and a few other items that change each month. It’s really a pretty simple macro, but it takes some time to run manually with the 50+ clients.

Ultimately I want to feed the client names into the macro, have it locate the client in the CRM software (using a "find" function in the CRM app), create the new SO, then move on to the next client name in the text file. So all I have to do each month is set the month name and dates in the macro, add any new clients to the text file and then set back and let it run. The rest will hopefully be Quick Macros history. I am looking for how best to accomplish this task. Slurping up the client names into an array or use some variation of the GetFile function that I have yet to uncover.

Thanks in advance for any assistance you may provide.
#2
Macro Macro1432
Code:
Copy      Help
str filename="$desktop$\test.txt"
str filedata line

filedata.getfile(filename)
foreach line filedata
,out line

or

Macro Macro1433
Code:
Copy      Help
str filename="$desktop$\test.txt"
str filedata line

filedata.getfile(filename)
ARRAY(str) a=filedata
int i
for i 0 a.len
,out a[i]

or

Macro Macro1432
Code:
Copy      Help
str filedata line

filedata=
;name1
;name2
;name3

foreach line filedata
,out line
#3
Thanks for the options. I'll give them a try.

Appreciate your time.

Lynn


Forum Jump:


Users browsing this thread: 1 Guest(s)