Thank you to the MrExcel forum for all the help in the past. You have been my go-to resource for Excel VBA.
I have created an "application" in Excel VBA (Excel 2019) to create quotes. This application saves the quotes in a binary file using
Dim TargetPath As String
Dim myfilename As String
myfilename = TargetPath & (Range("N5").Value & " " & Range("C3").Value & " " & Range("C5").Value & ".quote")
Open myfilename For Binary As #file2Write
... code to build arrays
Put #file2Write, , VersionArray
Put #file2Write, , HeaderArray
Put #file2Write, , DetailArray
Put #file2Write, , FooterArray
The resulting binary *.quote file is small (about 10 KB) and easy to email colleagues.
In order to open the attached *.quote file in the Excel VBA application, users must save the file, then run the OpenQuote code in the "application".
Dim TargetPath As String
Dim myfilename As String
Dim strQuote As String
strQuote = Application.GetOpenFilename(FileFilter:="Quotes (*.quote), *.quote", Title:="Choose a quote file to open", MultiSelect:=False)
Open strQuote For Binary As #file2Read
... code to define arrays
Get #file2Read, , VersionArray
Get #file2Read, , HeaderArray
Get #file2Read, , DetailArray
Get #file2Read, , FooterArray
I'm looking for a way to bypass the save attachment to file, then run the OpenQuote VBA inside the "application".
Normally when you right-click on an attachment and select Open, the file will be located in a folder and have a full file name like...
C:\Users\userid\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\YXP32SQF\0001.0-ALS-230103.quote
There may be better ideas out there, but I think what I need is a method call the Excel "application" OpenQuote VBA and pass the full file name from the Outlook attachment.
I'd also like to be able to do something similar when right-clicking on the *.quote file from inside Windows File Explorer.
I have created an "application" in Excel VBA (Excel 2019) to create quotes. This application saves the quotes in a binary file using
Dim TargetPath As String
Dim myfilename As String
myfilename = TargetPath & (Range("N5").Value & " " & Range("C3").Value & " " & Range("C5").Value & ".quote")
Open myfilename For Binary As #file2Write
... code to build arrays
Put #file2Write, , VersionArray
Put #file2Write, , HeaderArray
Put #file2Write, , DetailArray
Put #file2Write, , FooterArray
The resulting binary *.quote file is small (about 10 KB) and easy to email colleagues.
In order to open the attached *.quote file in the Excel VBA application, users must save the file, then run the OpenQuote code in the "application".
Dim TargetPath As String
Dim myfilename As String
Dim strQuote As String
strQuote = Application.GetOpenFilename(FileFilter:="Quotes (*.quote), *.quote", Title:="Choose a quote file to open", MultiSelect:=False)
Open strQuote For Binary As #file2Read
... code to define arrays
Get #file2Read, , VersionArray
Get #file2Read, , HeaderArray
Get #file2Read, , DetailArray
Get #file2Read, , FooterArray
I'm looking for a way to bypass the save attachment to file, then run the OpenQuote VBA inside the "application".
Normally when you right-click on an attachment and select Open, the file will be located in a folder and have a full file name like...
C:\Users\userid\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\YXP32SQF\0001.0-ALS-230103.quote
There may be better ideas out there, but I think what I need is a method call the Excel "application" OpenQuote VBA and pass the full file name from the Outlook attachment.
I'd also like to be able to do something similar when right-clicking on the *.quote file from inside Windows File Explorer.