PDA

View Full Version : Solved: Maybe Excel is not the problem



ladylexus
09-12-2008, 09:05 AM
I originally posted my problem in the Excel forum:(sorry,cant post the link)
the thread is
"cant open xls file saved from outlook using vb"

In short I have users that will recieve data as an attachment in Outlook.
The code I use looks in outlook for specific subject and when found copies the attachment to the harddrive.

The problem comes with the automated open of the saved xls file.

I get a message "Unable to get the open property of the workbook class".

I've noticed that the size was originally 358kb, in outlook as an attachment the size is 364kb and when the code run that copies the attachment to the harddrive the size is 360kb. Manually saving from outlook give an increased file size also.

I get the error with the 360kb file on the harddrive. I can manually open the saved xls file. If I open the saved file and do a save, without any changes, the file size is 358kb.

The code to open and save as a csv file then works.

I list all the code in the original post.

Hoping someone can point me in the right direction. I'm using Office 2003, and XP sp2.

Oorang
09-12-2008, 09:08 AM
The link is: http://www.vbaexpress.com/forum/showthread.php?t=22099

ladylexus
09-15-2008, 10:38 AM
the solution is, I'll have to settle for a workaround.