Jump to content

Recommended Posts

Posted

The possible error codes are documented in the header of the respective function in the UDF - or in the help file that comes with the download.

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

RTF mail format: Works as Text or HTML format. I prefer HTML because it is much easier to format the mail body.

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

Is it possible to provide an example of using an RTF body?

I do this for HTML and it works.  RTF does not work.

$hFileOpen = FileOpen("C:\wwweb\backgroundColors\Background_Text_Colors.rtf")
    $HTMLBody = FileRead($hFileOpen)
    FileClose($hFileOpen)
$olFormatRichText

So I read the file content and place that into the email request.  $olFormatHTML for HTML file works as expected.  $olFormatRichText for RTF does not.  I see the raw RTF tags.

Suggestions?

Skysnake

Skysnake

Why is the snake in the sky?

Posted

I have never used RTF. What I found on the web makes me think that it is quite complex - to say the least.

The thread is quite old but I think RTF is not supported and was introduced by "accident".

I tried and did not get a useful result:

#include <OutlookEX.au3>
Global $oOL = _OL_Open()
_OL_ErrorNotify(2)
$oItem = _OL_ItemCreate($oOL, $olMailItem, "*", "", "Subject=TestMail", "BodyFormat=" & $olFormatRichText)
$oItem.Body = "{\rtf1\ansi\deff0{\fonttbl{\f0 Arial;}}{\colortbl ;\red0\green0\blue255;}\pard\cf1\f0\fs24 Test}"
$oItem.Display()

 

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

gmail is a problem.

When I send with my Outlook client I can attach a PDF attachment is which displayed correctly in gmail.

 

However, when I attach the same PDF with the Outlook UDF the attachment gets renamed to "noname" with no extension.  When I download and open with Acrobat it works, it is obviously the correct attachment in the correct format, just the file.name gets stripped off. A formatting issue maybe?

Skysnake

Skysnake

Why is the snake in the sky?

Posted

Function _OL_ItemAttachmentAdd allows to specify the Displayname for an attachment. Does this help?

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

When you search the web for "gmail attachment noname" you get a lot of hits. Seems it is a problem with gmail :(

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

Thank you for all of this.  Perhaps in the documentation a section on "Known issues" - it reminds me of jchd's opinion on CSV format - the issues with sending email are plenty, and not really an actual standard... :)

Thank you very much for all of this.

Skysnake

Skysnake

Why is the snake in the sky?

Posted

Section has been added to the wiki :)

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 12.9.2017 at 9:31 AM, Skysnake said:

Your documentation is good.  I do however have this suggestion: Make a __Example.au3 file to run first, with the basics?  Yes, I found all the examples, but the problem is, Where to start? :)

I know the OutlookEX UDF has a lot of functions covering most of what Outllok is capable.
I tried to explain the concepts of the UDF in the wiki.

Where to start depends on what you try to achieve.

When I coded the UDF I created a kind of cross reference. Would this be helpful for newbies?

OutlookEX.png

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

Green: The function on the left (e.g. ItemAttachmentAdd) can be used with the item type in the marked column (e.g. mail and task).

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

 

  • 4 weeks later...
Posted (edited)

Hi,

I'm trying to access (all) items (emails) that are stored in the root of a separate pst opened in outlook.

I get a refernce to that pst by using _OL_PSTAccess() with no errors
but then I fail on trying to get items from the above pst by using _OL_ItemFind()

here is my failing attempt:

$oOL = _OL_Open() ; Connect or start up Outlook
ConsoleWrite("Debug: Outlook Open:  " & @error & @CRLF) ; no errors

$oOtherPST = _OL_PSTAccess($oOL, 'c:\temp\Another.pst') ; Access the other pst
ConsoleWrite("Debug: Access PST:    " & @error & @TAB & @extended & @CRLF) ; no errors

$aItems = _OL_ItemFind($oOL, $oOtherPST, $olMail, "", "", "", "EntryID,Subject", "", 1) ; <-- ??? how to reference $oOtherPST ??
ConsoleWrite("Debug: Item Find:     " & @error & @TAB & @extended & @CRLF) ; --> @error=4   @extended=1

please, could you show me the right way to use _OL_ItemFind() in this case?

Thanks

Edited by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

Will have a look tomorrow when I return to my office.

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

Just tested your script here and it works as expected.
Could you please modify the _OL_ItemFind statement?

$aItems = _OL_ItemFind($oOL, $oOtherPST, $olMail, "", "", "", "EntryID", "", 1)

 

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

Hi water, Thanks for you reply

I've used the line as you posted here above (removed the "Subject" field) but I get still the same error.
P.S.
BTW If I use instead the _OL_ItemFind() function on the "main" pst recalling emails from a folder of the main folder tree on the left pane of outlook (example using something like "*\foldername" in the second parameter of the _OL_ItemFind function) , then I get items correctly.

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

@water

... wait a moment...
I've found where is the problem
If there is an opened "reminder" popup window, the _OL_ItemFind function doesn't works on other pst, while it works instead on the main pst.
.. strange Behaviour, but seems that is like this. Well, thanks a lot anyway water for your help,


I have now though a new question:
How can I select subfolders from the external pst?
If I use the $oOtherPST variable in the second parameter, how can I add the string of the subfolder path??

Thanks in advance for any tips

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

Something like this:

#include <OutlookEX.au3>

$oOL = _OL_Open() ; Connect or start up Outlook
ConsoleWrite("Debug: Outlook Open:  " & @error & @CRLF) ; no errors

$oOtherPST = _OL_PSTAccess($oOL, 'c:\temp\Test.pst') ; Access the other pst
ConsoleWrite("Debug: Access PST:    " & @error & @TAB & @extended & @CRLF)

$aFolder = _OL_FolderAccess($oOL, StringMid($oOtherPST.FolderPath, 3) & "\Gelöschte Objekte", Default, $olMailItem)
ConsoleWrite("Debug: Folder Access:     " & @error & @TAB & @extended & @CRLF)

$aItems = _OL_ItemFind($oOL, $aFolder[1], $olMail, "", "", "", "EntryID,Subject", "", 1)
ConsoleWrite("Debug: Item Find:     " & @error & @TAB & @extended & @CRLF)

_arraydisplay($aItems)

_OL_PSTClose($oOL, $oOtherPST)

 

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

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...