On Feb 27, 4:59*am, joel <joel.471...@thecodecage.com> wrote:
> You may want to write this macro in Outlook VBA and have every thing
> automated. *You can hae outlook VBA filter you emial and when an email
> with a specific Subject line is received run a Macro in Outlook which
> will have your user access priviledges. *the outlook VBA can open an
> excel workbook(s).
>
> The Outlook VBA will take the incoming email and same the workbook in
> one of your folders. *then open the workbook and add the new data to
> your existing workbook.
>
> You can also have Excel VBA search you outllok folder for specific
> subject lines and take those emils and save the attachments into a
> folder and then add the new lines from the updated workbooks into your
> master workbook.
>
> I have written both type macros before and can find code once you come
> up with your preference.
>
> filtering on a subject line in VBA code (both outlook and excel)
> requires * doing a search of your emails which requires a class module
> in VBA.
>
> The easier method would be to manually add a task to your outlook email
> account which saves emails with a specific subject line to a outlook
> folder. *then the VBA code won't have to do the search.
>
> Again if you want to some manual operations you can simply manuall save
> the outlook emails to a PC folder and then your VBa macro just as to
> open all the files in the PC folder and add the new lines.
>
> The are lots of method to automated and semi-automate this process.
> Just rember VBA code can access your email and open workbooks either
> from Excel VBA or Outlook VBA. *You can even set up a schedule event on
> your PC which will run an Excel VBA macro. *The advantages of running a
> macro in Outlook is that your PC doesn't have to be on for an event to
> run, while a PC schedule event your PC needs to be running.
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile: 229
> View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=183137
>
> Microsoft Office Help
Thanks.
Could something like this be done? Would this be the simplest way?
(btw – WBK1 is opened by all users Read Only – not shared - it's a
kind of form, ie it's never changed and saved by any user, it's just
used for collecting data then passing it to WBK2)
Non-Access-User has WBK1 open (Read Only), Data is entered by Non-
Access-User. Non-Access-User finishes with data, runs Copy-Paste-
Clear-Data macro.
But this macro has been adjusted so that if it sees an “N” in Sheet1
CellS27, instead of trying to open WBK2 (which it can’t do), it opens
a new Outlook message to me with “DataForStore” in the subject line,
attaches WBK1 to it, sends it to my Outlook, then clears the data from
the Non-Access-User’s WBK1 ready for the next entry.
My Outlook would have a rule to put anything with the subject line
“DataForStore” in a specific folder. My Outlook opens any msg in the
DataForStore folder on arrival, opens the attached WBK1 and runs the
Copy-Paste-Clear-Data macro, then closes the attachment and deletes
the email msg – bearing in mind that I am a user too and would have
WBK1 open (Read Only) too and be using it just the same as all other
Access-Users and Non-Access-Users. (In the Copy-Paste-Clear-Data
macro, I have a routine which checks whether WBK2 is open before it
tries to copy and paste the data to it and, if it is open, will show a
warning “Can’t clear yet, try again in a few seconds”.)
I'm not worried about it not working if I'm not at my PC - it doesn't
matter if some of the data is lost when I'm away.