PC Review


Reply
Thread Tools Rate Thread

How to use automation to save xls into pdf from office 2007?

 
 
=?Utf-8?B?SnVu?=
Guest
Posts: n/a
 
      11th Apr 2007
Hi all,

I am trying to use offcie automation to convert a xls into pdf. I installed
the the save as pdf or xps addin and it worked fine from the application but
can find the right file format in the enum value.

any help will be approciated.. thx

here is the enum value in my system:
public enum XlFileFormat
{
xlCurrentPlatformText = -4158,
xlWorkbookNormal = -4143,
xlSYLK = 2,
xlWKS = 4,
xlWK1 = 5,
xlCSV = 6,
xlDBF2 = 7,
xlDBF3 = 8,
xlDIF = 9,
xlDBF4 = 11,
xlWJ2WD1 = 14,
xlWK3 = 15,
xlExcel2 = 16,
xlTemplate = 17,
xlTemplate8 = 17,
xlAddIn8 = 18,
xlAddIn = 18,
xlTextMac = 19,
xlTextWindows = 20,
xlTextMSDOS = 21,
xlCSVMac = 22,
xlCSVWindows = 23,
xlCSVMSDOS = 24,
xlIntlMacro = 25,
xlIntlAddIn = 26,
xlExcel2FarEast = 27,
xlWorks2FarEast = 28,
xlExcel3 = 29,
xlWK1FMT = 30,
xlWK1ALL = 31,
xlWK3FM3 = 32,
xlExcel4 = 33,
xlWQ1 = 34,
xlExcel4Workbook = 35,
xlTextPrinter = 36,
xlWK4 = 38,
xlExcel7 = 39,
xlExcel5 = 39,
xlWJ3 = 40,
xlWJ3FJ3 = 41,
xlUnicodeText = 42,
xlExcel9795 = 43,
xlHtml = 44,
xlWebArchive = 45,
xlXMLSpreadsheet = 46,
xlExcel12 = 50,
xlOpenXMLWorkbook = 51,
xlWorkbookDefault = 51,
xlOpenXMLWorkbookMacroEnabled = 52,
xlOpenXMLTemplateMacroEnabled = 53,
xlOpenXMLTemplate = 54,
xlOpenXMLAddIn = 55,
xlExcel8 = 56,
}

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      11th Apr 2007
the enum values you show are for the FileFormat argument of the Excel native
SaveAs command. If the ability to save as PDF requires an addin, then I
would suggest the command and its arguments are defined in that addin. You
will need to get some documentation for it.

--
Regards,
Tom Ogilvy


"Jun" wrote:

> Hi all,
>
> I am trying to use offcie automation to convert a xls into pdf. I installed
> the the save as pdf or xps addin and it worked fine from the application but
> can find the right file format in the enum value.
>
> any help will be approciated.. thx
>
> here is the enum value in my system:
> public enum XlFileFormat
> {
> xlCurrentPlatformText = -4158,
> xlWorkbookNormal = -4143,
> xlSYLK = 2,
> xlWKS = 4,
> xlWK1 = 5,
> xlCSV = 6,
> xlDBF2 = 7,
> xlDBF3 = 8,
> xlDIF = 9,
> xlDBF4 = 11,
> xlWJ2WD1 = 14,
> xlWK3 = 15,
> xlExcel2 = 16,
> xlTemplate = 17,
> xlTemplate8 = 17,
> xlAddIn8 = 18,
> xlAddIn = 18,
> xlTextMac = 19,
> xlTextWindows = 20,
> xlTextMSDOS = 21,
> xlCSVMac = 22,
> xlCSVWindows = 23,
> xlCSVMSDOS = 24,
> xlIntlMacro = 25,
> xlIntlAddIn = 26,
> xlExcel2FarEast = 27,
> xlWorks2FarEast = 28,
> xlExcel3 = 29,
> xlWK1FMT = 30,
> xlWK1ALL = 31,
> xlWK3FM3 = 32,
> xlExcel4 = 33,
> xlWQ1 = 34,
> xlExcel4Workbook = 35,
> xlTextPrinter = 36,
> xlWK4 = 38,
> xlExcel7 = 39,
> xlExcel5 = 39,
> xlWJ3 = 40,
> xlWJ3FJ3 = 41,
> xlUnicodeText = 42,
> xlExcel9795 = 43,
> xlHtml = 44,
> xlWebArchive = 45,
> xlXMLSpreadsheet = 46,
> xlExcel12 = 50,
> xlOpenXMLWorkbook = 51,
> xlWorkbookDefault = 51,
> xlOpenXMLWorkbookMacroEnabled = 52,
> xlOpenXMLTemplateMacroEnabled = 53,
> xlOpenXMLTemplate = 54,
> xlOpenXMLAddIn = 55,
> xlExcel8 = 56,
> }
>

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      11th Apr 2007
When I recorded a macro saving as PDF I got this:

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF,.....

xlTypePDF equals 0.

--
Jim
"Jun" <(E-Mail Removed)> wrote in message
news:B9E1B239-82D0-41D0-A3F9-(E-Mail Removed)...
| Hi all,
|
| I am trying to use offcie automation to convert a xls into pdf. I
installed
| the the save as pdf or xps addin and it worked fine from the application
but
| can find the right file format in the enum value.
|
| any help will be approciated.. thx
|
| here is the enum value in my system:
| public enum XlFileFormat
| {
| xlCurrentPlatformText = -4158,
| xlWorkbookNormal = -4143,
| xlSYLK = 2,
| xlWKS = 4,
| xlWK1 = 5,
| xlCSV = 6,
| xlDBF2 = 7,
| xlDBF3 = 8,
| xlDIF = 9,
| xlDBF4 = 11,
| xlWJ2WD1 = 14,
| xlWK3 = 15,
| xlExcel2 = 16,
| xlTemplate = 17,
| xlTemplate8 = 17,
| xlAddIn8 = 18,
| xlAddIn = 18,
| xlTextMac = 19,
| xlTextWindows = 20,
| xlTextMSDOS = 21,
| xlCSVMac = 22,
| xlCSVWindows = 23,
| xlCSVMSDOS = 24,
| xlIntlMacro = 25,
| xlIntlAddIn = 26,
| xlExcel2FarEast = 27,
| xlWorks2FarEast = 28,
| xlExcel3 = 29,
| xlWK1FMT = 30,
| xlWK1ALL = 31,
| xlWK3FM3 = 32,
| xlExcel4 = 33,
| xlWQ1 = 34,
| xlExcel4Workbook = 35,
| xlTextPrinter = 36,
| xlWK4 = 38,
| xlExcel7 = 39,
| xlExcel5 = 39,
| xlWJ3 = 40,
| xlWJ3FJ3 = 41,
| xlUnicodeText = 42,
| xlExcel9795 = 43,
| xlHtml = 44,
| xlWebArchive = 45,
| xlXMLSpreadsheet = 46,
| xlExcel12 = 50,
| xlOpenXMLWorkbook = 51,
| xlWorkbookDefault = 51,
| xlOpenXMLWorkbookMacroEnabled = 52,
| xlOpenXMLTemplateMacroEnabled = 53,
| xlOpenXMLTemplate = 54,
| xlOpenXMLAddIn = 55,
| xlExcel8 = 56,
| }
|


 
Reply With Quote
 
=?Utf-8?B?SnVu?=
Guest
Posts: n/a
 
      12th Apr 2007
Thanks you. i tried to reply yesterday but somehow my computer wont open the
popup.. anyway i was trying to use SaveAs and sure enough for pdf and xps, i
was supposed to use the ExportAsFixedFormat method. Thanks for pointing that
out..
Jun

"Jim Rech" wrote:

> When I recorded a macro saving as PDF I got this:
>
> ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF,.....
>
> xlTypePDF equals 0.
>
> --
> Jim
> "Jun" <(E-Mail Removed)> wrote in message
> news:B9E1B239-82D0-41D0-A3F9-(E-Mail Removed)...
> | Hi all,
> |
> | I am trying to use offcie automation to convert a xls into pdf. I
> installed
> | the the save as pdf or xps addin and it worked fine from the application
> but
> | can find the right file format in the enum value.
> |
> | any help will be approciated.. thx
> |
> | here is the enum value in my system:
> | public enum XlFileFormat
> | {
> | xlCurrentPlatformText = -4158,
> | xlWorkbookNormal = -4143,
> | xlSYLK = 2,
> | xlWKS = 4,
> | xlWK1 = 5,
> | xlCSV = 6,
> | xlDBF2 = 7,
> | xlDBF3 = 8,
> | xlDIF = 9,
> | xlDBF4 = 11,
> | xlWJ2WD1 = 14,
> | xlWK3 = 15,
> | xlExcel2 = 16,
> | xlTemplate = 17,
> | xlTemplate8 = 17,
> | xlAddIn8 = 18,
> | xlAddIn = 18,
> | xlTextMac = 19,
> | xlTextWindows = 20,
> | xlTextMSDOS = 21,
> | xlCSVMac = 22,
> | xlCSVWindows = 23,
> | xlCSVMSDOS = 24,
> | xlIntlMacro = 25,
> | xlIntlAddIn = 26,
> | xlExcel2FarEast = 27,
> | xlWorks2FarEast = 28,
> | xlExcel3 = 29,
> | xlWK1FMT = 30,
> | xlWK1ALL = 31,
> | xlWK3FM3 = 32,
> | xlExcel4 = 33,
> | xlWQ1 = 34,
> | xlExcel4Workbook = 35,
> | xlTextPrinter = 36,
> | xlWK4 = 38,
> | xlExcel7 = 39,
> | xlExcel5 = 39,
> | xlWJ3 = 40,
> | xlWJ3FJ3 = 41,
> | xlUnicodeText = 42,
> | xlExcel9795 = 43,
> | xlHtml = 44,
> | xlWebArchive = 45,
> | xlXMLSpreadsheet = 46,
> | xlExcel12 = 50,
> | xlOpenXMLWorkbook = 51,
> | xlWorkbookDefault = 51,
> | xlOpenXMLWorkbookMacroEnabled = 52,
> | xlOpenXMLTemplateMacroEnabled = 53,
> | xlOpenXMLTemplate = 54,
> | xlOpenXMLAddIn = 55,
> | xlExcel8 = 56,
> | }
> |
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Outlook Automation, Office 2007 Piet Linden Microsoft Access VBA Modules 1 9th Jun 2009 09:06 AM
Office Automation through C#.Net (with out save option, ctrl-s and mouse click disabled) apondu Microsoft Word Document Management 1 18th Jul 2007 06:47 AM
Office Automation through C#.Net (with out save option, ctrl-s and mouse click disabled) apondu Microsoft Excel Programming 1 18th Jul 2007 04:10 AM
Office Automation through C#.Net (with out save option, ctrl-s and mouse click disabled) apondu Microsoft Dot NET 0 18th Jul 2007 02:57 AM
Office Automation through C#.Net (with out save option, ctrl-s and mouse click disabled) apondu Microsoft C# .NET 0 18th Jul 2007 02:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 AM.