Word VBA: Save as not working when attaching a Word Doc to an Outlook Email?

jscranton

Well-known Member
Joined
May 30, 2011
Messages
707
I wrote a piece of code that would attach the active word document to an outlook email. This worked fine.

Code:
    myDoc.Save    

    With EmailItem
        .subject = fileName
        .Attachments.Add myDoc.FullName
        .Display
    End With

Of course, the powers have asked to use Save as:

Code:
    myDoc.SaveAs fileName:=("Feedback_Form_" + formName), FileFormat:=wdFormatDoc

However, whenever I do this, the document saves without an extension (I have tried every file format available).

What am I missing?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Sorry. Figured it out (and I knew it was something simple). You have to include the file extension as part of the filename. "Feedback_Form_" + formName + ".doc") worked.
 
Upvote 0

Forum statistics

Threads
1,225,626
Messages
6,186,094
Members
453,337
Latest member
fiaz ahmad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top