Attaching files as extensions with Outlook.exe

Hi

Dragging outlook.exe to toolbar and clicking dont attach file - error "command line argument not valid"

please help, i use windows 10 and office 365

Or is there a keyboard shortcut that sends a file til eg outlook or windows mail 10 (i see that F11 did in previous version) I use version 12

thanks
Nolan

Running outlook.exe with just a file path probably won't make it start a new email with that file attached. But what happens is entirely up to Outlook and not Opus; Opus just builds the command line you tell it to build and passes it to Outlook, and it's up to Outlook how it interprets that command line.

This is more a question about how to use Outlook than Opus, so I am far from an expert here, but I found this which appears to have some solutions:

I am not sure if any of them work with the Office 365 version of Outlook. By the sound of it, the command line interface for Outlook has changed a few times over the years.

Try those suggestions from a Command Prompt (without Opus involved at all, to keep things simple) to see if they work with your version of Outlook. If they do, we can help you turn them into an Opus button if needed.

Thanks, I will look at the link you mentioned.

But Opus should be able to do that, as I understand.

Is there a key like with eg F11 see above, that and the file to mail application?

Ok I know this link I tried it, it don't work unfortunately

Opus has a Zip & Email command which might work. It's in the right click menus if you have turned it on under Preferences / Zip & Other Archives.

Thanks, yes i know that feature, but isnt there a feature as in the old version like F11 which send the file selected, via mail ?

I don't think F11 ever did that by default in Opus, but if it did it probably just ran the same command. You can assign any hotkey you like to most commands.

So no way to send files via mail with build in feature or command? Or any other way in Opus?

Yes, the Zip & Email command I mentioned earlier.

thanks, but that only creates what you see on attached screenshot, from there i cant select any person from my contacts hence i have to remember everybpdys mail address - not great.

None of the other build in ? Theres a Mail icon/feature but that doesnt work either

thanks

Try the other two options under Preferences / Internet / Email / Send email via... to see if they work with Outlook.

If they don't, you'll probably need to ask for help on a forum of people who know more about Outlook, and how to run the version of Outlook you're using via the command line.

If they can tell you the command line to use to tell Outlook to create a new message with an attachment, then we can tell you how to run that command line from Outlook.

Thanks, but it's a lot of try and error advice, isn't there any smart function in Opus to do that? Is it intentional that the user interface on my screenshot has the limitation that I have to remember all my contacts mail addresses?

Is this forum the only support in Opus or can I send support a support ticket?

I have purchased Opus the past 9 years

Please try the three built-in options. That will only take a few seconds, and may work instantly.

Using the MAPI option is the one I would try first with Outlook. You can try that in less time than it takes to write a reply asking for a different answer. There's no point asking for help if you don't try the suggestions; that wastes both our times.

If that doesn't work, give the sentto option a quick try.

If none of the three options work, you'll need to find out how to tell your version of Outlook to do what you want via the command line. The Stackoverflow thread I linked above shows that it is possible, but the exact details vary with versions of Outlook. That becomes a question of how to use Outlook, not Opus. This is a forum for help with Opus, and not one where we have much expertise on Outlook.

This thread may also be of use, or at least shows what you want to do was possible in an older version of Outlook. (Unfortunately, it seems Outlook keeps changing how it works, so details may need modifying, as mentioned in the Stackoverflow thread I linked earlier):


This is the official tech support area for Opus. You're already here.


HI thanks
i of course tried all 3 build-in options when i setup smtp it dont work i get an error 503, which i cant find a solution to. mailto works but very very slow and opening windows not send to front - so not working well. Rest dont work - i cant find any solution to a setup string command for office365. The article you pointed to regarding address books says: "Note: this feature was removed from Outlook 2003 and above" so it is not possible to use the address book, i have to remember all my contacts mail adresses with the build-in smtp feature. Status: nothing seems to work

Finding the right command line to make your version of Outlook send a message with an attachment is what I would go for.

It looks like it should be possible, based on the Stackoverflow thread.

ok thanks, ill see what i can find

Hello,

I don't know if this helps you, I found it on the Opus forums some time ago, so the credit goes to the original author; I just tweaked it to my use. Using the desktop version of Outlook it will attach the selected files to a newly created email. Outlook most run in the background for this to function. I use it as a toolbar button to quickly send files when needed.

Option Explicit
Function OnClick(ByRef clickData)
	DOpus.ClearOutput
	Dim cmd, lister, tab, selItem, folderEnum, folderItem
	' ---------------------------------------------------------
	Set cmd = clickData.func.command
	cmd.deselect = false ' Prevent automatic deselection

Dim OutApp, oNameSpace, oInbox, oEmailItem, olMailItem
Dim a, oAttachments, subjectStr, olFormatHTML
Dim objFSO,strSigFilePath, objSignatureFile, strBuffer, strText
olMailItem = 0
olFormatHTML = 2
Set OutApp = CreateObject("Outlook.Application") 'opens Outlook
Set oEmailItem = OutApp.CreateItem(olMailItem) 'opens new email
Const LineBreak = "<br>"

	DOpus.Output "Selected items in " & clickData.func.sourcetab.path & ":"
	If clickData.func.sourcetab.selected.count = 0 Then
		DOpus.Output "  (none)"
		Exit function
	Else
		For Each selItem in clickData.func.sourcetab.selected
			If (selItem.is_dir) Then
				DOpus.Output "  (d) " & selItem.RealPath
			Else
				DOpus.Output "  (f) " & selItem.RealPath
	'	Set oAttachments = oEmailItem.Attachments.Add(selItem.RealPath)
		Set oAttachments = oEmailItem.Attachments.Add(CStr(selItem.RealPath))
			
				subjectStr = subjectStr & Right(selItem.RealPath,Len(selItem.RealPath)-(InStrRev(selItem.RealPath,"\"))) & ", " 
				strText = strText & LineBreak & "- " & Right(selItem.RealPath,Len(selItem.RealPath)-(InStrRev(selItem.RealPath,"\")))
			End If
		Next
	End If

DOpus.Output clickData.func.sourcetab.selected(0).RealPath
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Change your username and the Outlook signature file name
strSigFilePath = "C:\Users\Val\AppData\Roaming\Microsoft\Signatures\"
Set objSignatureFile = objFSO.OpenTextFile(strSigFilePath & "Infusionsoft.htm")
'Set objSignatureFile = objFSO.OpenTextFile(strSigFilePath & "Core.htm")
strBuffer = objSignatureFile.ReadAll
objSignatureFile.Close

'Change the Email Subject Prefix and the Text Prefix
oEmailItem.Subject = "Attached files" 
oEmailItem.BodyFormat = olFormatHTML
oEmailItem.HTMLBody = LineBreak & LineBreak & "The following files are attached: " & LineBreak _
	& strText & LineBreak & LineBreak & "Kind regards," & LineBreak & "Val" _
	& LineBreak & LineBreak & strBuffer

oEmailItem.Display


End Function

Thanks, that could be a way to go, but how do I use the code ? I have no experience in this, so I would need a detailed step by step

Thanks