Outlook programmatically avoid Attachment.SaveAsFile() Pop-up on XSL - vb6

I have developed a Outlook polling service that does the following:
The service is not a windows service but a rich client.
It is developed in Visual Basic 6.
The "robot" basicly polls outlook for new mails
If a new mail is found the Attachment.SaveAsFile(path) is used to save each attachment.
When I save Excel files (xls) extension. Outlook will launch Excel and Excel will pop-up with the following message with older xsl files (prior excel 2000).
"Do you want to save the changes to 'SaveAttFromBlaBla.xsl'?
"Microsoft Office Excel recalculates formulas when opening files last saved by an earlier version of Excel."
Does anyone know of a way to not have the pop-up occur? And by default select "Yes" to recalculate?
Thanks

Use
Excel.Application.DisplayAlerts = False
Works with Word as well.

Related

How to create a power automate flow that opens a link in an outlook email (with excel file in it) and save it into sharepoint?

I need to open a excel spreadsheet link that I receive in my outlook email almost everyday ,and and save that file in a sharepoint folder. But how can I do it using power automate ?

Locked excel sheet that isn't open

I am trying to open a locked excel sheet. The warning says it is locked because it is being used by "AN Other".
This person does not have the sheet open, does not have any excel applications open, does not have any excel based tasks running in the task list and has tried the good old "turning it off and on again".
Neither of us can save onto this filename, change it in windows explorer or delete the file.
We have "saved as" another name but really need the original name. I looked at a few forums and they suggest this is an excel/windows bug.
Am using excel 2010 and Windows 7.
You need to get in touch with your IT support.
In a company network, a file will be locked for other users when somebody edits it. It can happen sometimes that the file does not get released (unlocked) when the user closes it. Your IT Support people need to unlock the file, so you can edit it again.

How can I tell if Office Clipboard collection is turned on?

I want to know whether the Office clipboard collection is turned on. This is the clipboard pane that saves the last 24 clipboard data. On Office 2007 and 2010 you get it by expanding the clipboard area on the Home ribbon, and in Office 2003 you can open it from the task pane area, and selecting clipboard from the menu.
I've an Office plugin.
Although I'm doing all sort of API hooking (using IAT), I'm looking for the simplest solution.
My initial idea was to look for a window with title: "Collect and Paste 2.0" (check out yourself with Spy++), with various Windows class (e.g. in Word it is bosa_sdm_msword). However, users can check the 'Collect without showing Office clipboard', and restart Office. At this point, Office will collect data without any sign to the Window.
I am looking at registry key: Software\Microsoft\Office\%d.0\Common\General\AcbOn. This is cool, but this entry isn't saved until user exit Office. Hence, users can open a different application, turn on collection, close the window.
Office clipboard creates an icon in the notification area. See question: how to acquire list of notification area icons?. Unfortunately, this question got no answer that work. If you know the answer for this, please reply here or on that question (you'll get +1 twice!)
As I said, I'm inside the process of the application and I'm able to intercept anything that has an export symbol, but I'd like to minimize the effect on the application. For example, intercepting send message, or subclassing a Window will have an effect on the performance (and in some cases: stability) of the Office application.
In Office 2003 there is a window with a class named ('ActiveClipboard'), but I can't find it on 2007 and 2010. On the other hand I see WM_USER+2304, which I don't know what it is.
Has anyone went through that path? Any hint?
Answering my own question:
As far as I can tell, Office doesn't have any event or API in the object model to tell you whether Office is collecting the clipboard. However, the combination of these two methods is working for me:
Enumerate all windows in the system, and search for a Window with the following attributes (class name/title respectively):
Word 2010: "bosa_sdm_msword", "Collect and Paste 2.0"
Word 2003: "bosa_sdm_Microsoft Office Word 11.0", "Collect and Paste 2.0"
Word 2007: "bosa_sdm_Microsoft Office Word 12.0", "Collect and Paste 2.0"
Excel (all): bosa_sdm_XL9", "Collect and Paste 2.0"
PowerPoint (all): "bosa_sdm_Mso96", L"Collect and Paste 2.0"
If such a window exists, this means Office is collecting clipboard data.
Search registry key: HKCR\Software\Microsoft\Office\14.0\Common\General\AcbOn (REG_DWORD). A value of 1 well tell you Office is collecting data.

Excel Workbook Open event from within an addin?

I am trying to trigger a macro to run when an Excel document is opened.
The problem I am running into is that all of my code resides within an Excel add-in. The Workbook_Open event doesn't work because I can't put the code in individual documents, I need it to reside in the add-in and run whenever any document is opened.
Is there a way to modify the Workbook_Open event or is there another way to trigger a macro when a different document is opened?
You need to use an Application event. There is a good writeup on how to do this at Chip Pearson's site here.

Open .eml files in compose mode in outlook 2010

I want my users to be able to open eml files in compose mode in outlook 2010, by default it opens in readonly mode. Is there any way out?
Use: We generate email templates which the users can download and customize it before sending.
If you can add the header "X-Unsent: 1" to your .eml, it should open in Compose mode.
Works on Microsoft Outlook but does not work on thunderbird.
A related discussion can be found here https://bugzilla.mozilla.org/show_bug.cgi?id=688284
Mail on MacOS adds this header internally:
X-Uniform-Type-Identifier: com.apple.mail-draft
Unfortunately, this will still not allow you to sent it directly. However, you can move any mail to your drafts folder and then sent it from there.

Resources