Jump to content

how to copy one cell at a time from excel sheet and parse the data into outlook mail?


Go to solution Solved by water,

Recommended Posts

Posted

Hello Water, 

Local $clientname = StringStripWS(ControlGetText($hWnd, '', 'TEIEdit106'),8) ;getting the client name

I mean if suppose in system client name is "ABC LTD" but i get output from controlgettext "ABCLTD" without any space between, how to get variable data as it is. 

2nd query was if suppose user would like to process for muliple files,how to go about that

 Local $filenumber = InputBox("Input Box", "Enter your File numbers.")

Above case this give option to update only 1 file number, if there are mutilple file numbers, what will be code? 

 

 

Posted

You are using the wrong flag for StringStripWS. Please check the help file for the proper flag to remove leading/trailing and doubl whitespace.

The user could enter a separator character and enter multiple file numbers this way e.g. "number1;number2;number3". Then use StringSplit to retrieve each file number.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Hello Water, 

Local $clientname = StringStripWS(ControlGetText($hWnd, '', 'TEIEdit106'),8) ;getting the client name

I mean if suppose in system client name is "ABC LTD" but i get output from controlgettext "ABCLTD" without any space between, how to get variable data as it is. 

2nd query was if suppose user would like to process for muliple files,how to go about that

 Local $filenumber = InputBox("Input Box", "Enter your File numbers.")

Above case this give option to update only 1 file number, if there are mutilple file numbers, what will be code? 

 

 

Posted
On 3/10/2017 at 0:36 AM, water said:

 

Come on, that's not too hard to put some quotes around the HTML code and concatenate with $sBody :)

 

Hello Water,

 

I have tried to put quotes around HTML code however am getting error, can you please help on this

Posted
Global $sBody = $sStyle & "<Table><TR><TD>" & $sshpordr & "<TD>" & $var & "</TD></TD></TR><TR><TD>" & $onhandnmbr & "<TD>" & $onhand & "</TD></TR></TD><TR><TD>" & $omnmbr & "<TD>" & $iomb & "</TD></TD></TR>" & _
"<TR><TD>" & $cfs & "<TD>" & $cfs1 & "</TD></TD></TR><TR><TD>" & $point & "<TD>" & $point1 & "</TD></TD></TR><TR><TD>" & $ctc & "<TD>" & $ctc1 & "</TD></TD></TR><TR><TD>" & $chb & "<TD>" & $chb1 & "</TD></TD></TR><TR><TD>" & $hpr1 & "<TD>" & $shpr & "</TD></TD></TR><TR><TD>" & $cnee1 & "<TD>" & $cnee & "</TD></TD></TR><TR><TD>" & $sVessel & "<TD>" & $vsl1 & "</TD></TD></TR><TR><TD>" & $voyage & "<TD>" & $voy1 & "</TD></TD></TR><TR><TD>" & $etd & "<TD>" & $bkd1 & "</TD></TD></TR><TR><TD>" & $custom & "<TD>" & $lrd1 & "</TD></TD></TR><TR><TD>" & $final & "<TD>" & $dlv & "</TD></TD></TR><TR><TD>" & $pos & "<TD>" & $ponum1 & "</TD></TD></TR><TR><TD>" & $inv & "<TD>" & $invnum1 & "</TD></TD></TR><TR><TD>" & $pkg & "<TD>" & $pkgs & "</TD></TD></TR></TABLE>" & _
'<p><span lang="en-us" sytle="font-family:Arial, sans-serif;color:#000080;"xml:lang="en-us">Please note the following >>>>><br/br/>' & _
'1. hello</span><span lang="eng-us" style="font-size:12pt;font-family:"Times New Roman",serif;"xml:lang="en-us"></span></p><p></p>'

Wasn't too hard, was it?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Hello Water,

You are simply  great and magician but for me its little bit difficult,still trying to figure out, how did you do that

What if i want to add these quotes before table? 

 

Posted

Just do it! You now know how HTML should be enclosed in quotes.
The web is full of easy to read/understand HTML tutorials.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Hello Water,

My project is almost complete only because of you, my last activity is to scan this email to my internal system for that we have option Print2edoc which directly this email to our system,Autoit window not giving any information, attached is the screen shot

Print.PNG

Posted

You could use this UDF to set the default printer,

then run _OL_ItemPrint to print the mail.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Use function ControlSend.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

If it works it is the right way. If not it isn't.
I assume it doeswn't work.
I suggest you check the help file on how to specify the class of a control.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted
On 3/15/2017 at 11:41 AM, water said:

then run _OL_ItemPrint to print the mail.

Hello Water,

This picking up default printer , if want to select printer from drop down list, how to code it?

Printer.png

Posted

Isn't it always the same printer?
Would the user need to select a printer from the above dropdown and should this information then be passed to your AutoIt script?
 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Then why do you want to use a dropdown when the printer name is fixed?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...