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

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? 

 

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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? 

 

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

:)

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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