Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

printing to XPS and saving XPS "as"

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  Increase performance by using Windows ReadyBoost?  
Author Message
Jim A

External


Since: Jan 3, 2009
Posts: 1



(Msg. 1) Posted: Sat Jun 13, 2009 4:43 pm
Post subject: printing to XPS and saving XPS "as"
Archived from groups: microsoft>public>excel (more info?)

Hi - I have a "save as" macro that I would like to incorporate with my "print
to XPS" macro. Can anybody help?

I have this code:
'' Save to XPS ''''''''''''''''''''''''''''
Application.ActivePrinter = "Microsoft XPS Document Writer on Ne01:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Credit History").PrintOut Copies:=1
Application.ActivePrinter = "HP LaserJet P1505n on Ne02:"
'''''''''''''''''''''''''''''''''''''''''''''''''''''

BUT I would like the macro to "save as" like this macro:


'''''''''''''''''Save To Path Code'''''''''''''''''''''''
Dim sPath As String
Dim y1 As String, n1 As String
On Error Resume Next 'overcoming the error when a direcory already
exists for MkDir sPath

y1 = Sheets("1").Range("N1").Value
n1 = Sheets("1").Range("B1").Value
sPath = "D:\Ayers My Docs\AHS\AHS Credit Spreadsheets\" & n1 & " " & y1

'make Dir if NOT already there
MkDir sPath

''''''''''''''''''''''' SaveAs Code '''''''''''''''''''''''''''
ActiveWorkbook.SaveCopyAs sPath & "\" & y1 & Format(Now, " mmm-dd-yy
hhmmss") & ".xlsm"

MsgBox "Workbook Saved As '" & y1 & "' in folder '" & sPath & "'."
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


How can I print to XPS saving with the same parameters as the above "save
as" macro?

Thanks for any help - Jim A

 >> Stay informed about: printing to XPS and saving XPS ""as"" 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Favorite Excel Time Saving Tips - Greetings. I just started working on a web page featuring favorite Excel time saving tips. Unfortunately, it is 9PM, I'm exhausted from watching football and playing with the grandkids and working on taxes. So, I can only think of a few. My..

Excel Pivot Table - Saving issue - Hi, I have a file which contains several pivot tables, when I save the file and reopen it for some reason it opens with all but one of the sheets as a normal table as opposed to a pivot. Has anyone experienced this before/ has a solution to my problem...

Printing Cheque of Different sizes from the same Worksheet - Hi All, Kindly mention yours email ID for the sample file. >>>>>>>>>>>>>> Present Scenario >>>>>>>>>>>>>>>>>>>> I have bank account in 4 ...

INDEX MATCH HELL ooops.. I mean HELP! - I know (or at least I think I do) that I can do this with INDEX MATCH. Here is what I want to do. I want to place this formula in cell C4 of Sheet 1. What I want this formula to do is to match the value of B2 of Sheet 1 with a list that is in Sheet 2...

Notation Bugs - Did anybody notice that Excel handles math notations (symbols) in an incorrect way? Try this: write -2 in cell A1. Write =1-A1^2 in a different cell. Write =-A1^2+1 in another cell. The two expressions are equivalent, shouldn't they? Well, the former..
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]