Macro to select PDF-printer problem??

Mötley

Board Regular
Joined
Aug 3, 2011
Messages
93
Hello, I have a problem like this;

I've recorded macro that selects PDF-printer, converts wanted range into PDF, then opens email application and user can send range to wanted address. Problem is that every time I record macro, it works fine, just like i want it to work.. but when I close workbook, then open it again and run macro, it does not do anything I recorded :P It does select pdf-printer (sometimes) but it wants me to save file (didn't record anything like that), and sometimes it just prints range into paper :P

Is this macro ruined somehow or doesn't it just work ??

Point is that user selects "Send PDF", macro then selects PDF-printer, then opens email application where user can write address. All this is working but when I close workbook and then open it, won't work :P

Here's the code

Code:
Sub SendPDF()
'
' SendPDF Makro
'
'
    ActiveWindow.SmallScroll Down:=15
    Range("RANGE").Select
    ActiveWindow.SmallScroll Down:=-69
    Selection.PrintOut Copies:=1
    ActiveWindow.SmallScroll Down:=-3
    Range("A26").Select
    ActiveWindow.SmallScroll Down:=-42
    Range("A26").Select
End Sub
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

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