namerg
asked on
An automated way to download an xlsx attachment and convert it into a CSV
Hello,
I would like to know an automated way to download an xlsx attachment and convert it into a CSV and drop it into a network share.
Thanks
I would like to know an automated way to download an xlsx attachment and convert it into a CSV and drop it into a network share.
Thanks
An xlsx attachment to an e-mail?
ASKER
Sorry, i forgot to add that. Yes, download the attachment from an outlook email.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I have office Pro Plus 2010 and do not see the Macros option. :(
I don't know where they are in Office 2010, but they should be somewhere!
http://www.addictivetips.com/windows-tips/macros-in-office-excel-2010/
They could be disabled by default though:
http://www.nirmaltv.com/2009/12/28/how-to-enable-macros-in-office-2010/
http://www.addictivetips.com/windows-tips/macros-in-office-excel-2010/
They could be disabled by default though:
http://www.nirmaltv.com/2009/12/28/how-to-enable-macros-in-office-2010/
ASKER
hmm nope, did not work. No idea how to make the Macros option appear.
Check the online help maybe.
Try this:
http://www.addictivetips.com/windows-tips/enable-all-macros-in-excel-2010/
Try this:
http://www.addictivetips.com/windows-tips/enable-all-macros-in-excel-2010/
ASKER
Vivigatt, it is not for excel. The macro option is for Outlook, not excel. Do you understand me?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
U GOT IT @ve3ofa
You should be able to use automation (macros) in Excel and Outlook, and even call Outlook from Excel. I don't think you can manipulate .xlsx files from Outlook. You coudl even use Outlook "from excel", using a macro and some "outlook object"
ASKER
I am getting a type mismatch error, run time 13 on line 19
Sub SaveAttachments()
Dim olApp As Outlook.Application
Dim olNs As NameSpace
Dim Fldr As MAPIFolder
Dim MoveToFldr As MAPIFolder
Dim olMi As MailItem
Dim olAtt As Attachment
Dim MyPath As String
Dim i As Long
Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr = olNs.GetDefaultFolder(olFolderInbox)
Set MoveToFldr = Fldr.Folders("CompSurv")
MyPath = "C:\My Documents\Completed Survey\"
For i = Fldr.Items.Count To 1 Step -1
Set olMi = Fldr.Items(i)
If InStr(1, olMi.Subject, "Completed Survey") > 0 Then
For Each olAtt In olMi.Attachments
If olAtt.FileName = "Test.xls" Then
olAtt.SaveAsFile MyPath & olMi.SenderName & ".xls"
End If
Next olAtt
olMi.Save
olMi.Move MoveToFldr
End If
Next i
Set olAtt = Nothing
Set olMi = Nothing
Set Fldr = Nothing
Set MoveToFldr = Nothing
Set olNs = Nothing
Set olApp = Nothing
End Sub
Capture.PNG
ASKER
I got it. I have to set line 7 as Dim olMi As Variant
ASKER
Hmm, this is new "You must assign a minimum of 20 points to all answers." I cannot submit after choosing the answers and close this case
You must assign a minimum of 20 points to all answers should probably read
You must assign a minimum of 20 points to all selected answers
You must assign a minimum of 20 points to all selected answers
ASKER
hmm, that is new...i never had to do that
ASKER
Does not let me add the 20 points....
Hi, namerg.
Yes, this can all be done from within Outlook. The code required is surprisingly simple. Do you want this to work automatically (e.g. like a rule) or do you want to select a message and run the macro manually?
Yes, this can all be done from within Outlook. The code required is surprisingly simple. Do you want this to work automatically (e.g. like a rule) or do you want to select a message and run the macro manually?
ASKER
I am using Accept Multiple Solutions
ASKER
I think it worked now