Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / August 2007

Tip: Looking for answers? Try searching our database.

XPS Default File Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave@Penske - 30 Aug 2007 18:02 GMT
Hi there:

I am printing to a .xps file. However, each file I save from .xls, prompts
for a file name with the .xps set as the default.
Does anyone know how to set the current workbook name of a .xls file as the
default name for the .xps file?

Much Appreciated,
David
Jim Rech - 30 Aug 2007 19:43 GMT
I guess you should save via a macro:

Sub SaveActiveWBookAsXPS()
   Dim WBName As String
   Dim DotPos As Integer
   WBName = ActiveWorkbook.Name
   DotPos = InStrRev(WBName, ".")
   If DotPos > 0 Then WBName = Left(WBName, DotPos - 1)
   ActiveSheet.ExportAsFixedFormat Type:=xlTypeXPS, Filename:="C:\" &
WBName, _
       Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
       :=False, OpenAfterPublish:=False
End Sub

Signature

Jim

| Hi there:
|
[quoted text clipped - 5 lines]
| Much Appreciated,
| David

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.