Jump to content

OutlookEX UDF - Help & Support (III)


water
 Share

Recommended Posts

I think this WAD. Because you are the one who sends the mail - but in the name of another user.
If you want a copy of the sent mail in the sent folder of the other mailbox you need to copy the mail item.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

$aItems = _OL_ItemFind($oO, "*\Sent", $olMail, "[From]='Test' And [Subject]='Testt'", "", "", "Subject", "", 1)

I try to find the Item by the senders name and the subject. But i'm doing something wrong. I got the information from msdn. It seems like its different.

Link to comment
Share on other sites

What is the value of @error and @extended after you called the function?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Should be

$aItems = _OL_ItemFind($oO, "*\Sent", $olMail, "[SenderName]='Test' And [Subject]='Testt'", "", "", "Subject", "", 1)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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,

 

New question for you , I have a secondary PST folder open in outlook.

I have an exiting Folder Called Microsoft, I now want to add subfolders underneath Microsoft

I tried the below and it errors out .

 

Global $oOutlook = _OL_Open()
Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst")

 _OL_FolderCreate($oOutlook, "\Microsoft\Issues", $olFolderInbox, $ofolder)

 

Link to comment
Share on other sites

When you search the forum for posts where I ask users for more information to track down an issue, what do I ask for ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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:

Global $oOutlook = _OL_Open()
Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst")
_OL_FolderCreate($oOutlook, "Microsoft\Issues", $olFolderInbox, $ofolder)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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 replace $oFolder with the name of the store as displayed in the folder pane and add a trailing "\Microsoft".

Global $oOutlook = _OL_Open()
Global $oFolder = _OL_PSTAccess($oOutlook, "D:\Test.pst")
_OL_FolderCreate($oOutlook, "Issues", $olFolderInbox, "Test\Microsoft")

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

  • 3 weeks later...

Hi water,

Thanks for the fantastic UDF. I just started to use it 2 weeks ago and already loved it.

One question about keeping the signature when modify the body: Is it still working in Outlook 2016?

I tried with the example in your wiki page, tried all 3 types of body format, but unfortunately, none of them work. The signature is gone right after I added the content.

I tried to add a ConsoleWrite after save the body into $sBody:

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
;===========
; Plain Text
;===========
$oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=Subject for BodyFormat=Plain Text")
$oItem.BodyFormat = $olFormatPlain
$oItem.GetInspector
$sBody = $oItem.Body
$oItem.Body = "Text: Mail Text" & $sBody
$oItem.Display

But the Console only writes "Saved body", seems like the sBody does not get anything from the mail.  

Confirmed the mail does contain a signature by adding  $oItem.Display and sleep(3000) before " $sBody = $oItem.Body" line.

Not to sure how to debug this, please help. Thanks a lot!

 

Link to comment
Share on other sites

Glad you like the UDF :) 

I'm running Outlook 2010 and the example script you posted above works just fine.
Can you please post the script YOU run (including ConsoleWrite Statements etc.)?

 

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Hi water,

Thanks for the reply.

Below is the code I used for test:

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
$oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=Subject for BodyFormat=RTF")
$oItem.BodyFormat = $olFormatRichText
;$oItem.GetInspector
$sBody = $oItem.HTMLBody
$oItem.Display
Sleep(3000)
ConsoleWrite( "Following is the body saved: " & @CRLF & $sBody & @CRLF )
$oItem.HTMLBody = "RTF: <b>Mail</b> Text" & $sBody

Since I insert the $oItem.Display before sleep(3000), so I can see the signature is there in the mail body. But after 3 seconds, the mail body changed to only one line "RTF: Mail Text" without signature.

The Console only writes "Following is the body saved: " and an empty line.

Link to comment
Share on other sites

Seems to be a problem with Outlook 2016. I only have Outlook 2010 and your script works fine here.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

18 hours ago, water said:

Seems to be a problem with Outlook 2016. I only have Outlook 2010 and your script works fine here.

Thanks for the testing.

Too bad, can't downgrade the version of Outlook on the company notebook. Do you have plan to make this working on Outlook 2016 anytime soon?

Link to comment
Share on other sites

As soon as I know how to solve this problem I will implement it.
But unfortunately I have been unable to find any information about this problem nor a solution on the web.
If you do, please let me know ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

At the moment I have no idea. I searched the web and didn't find a hint how to solve this problem.
If you find some code snippets for Outlook 2016 I should be able to translate them to AutoIt.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

On 13/04/2017 at 5:45 PM, water said:

At the moment I have no idea. I searched the web and didn't find a hint how to solve this problem.
If you find some code snippets for Outlook 2016 I should be able to translate them to AutoIt.

Sorry, I'm totally outsider for outlook. Have no idea about how to collect code snippets. Looks like have to wait someone else can help this part.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...