Application Center Usage - VBA and Excel

This is Interesting: Free IT Magazines  
Home > Archive > Application Center Usage > December 2006 > VBA and Excel





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author VBA and Excel
M. Hussaini

2006-12-12, 1:17 pm

I have the following code which I am using in BusinessObjects. The code is
contained in a procedure that saves the BusinessObjects file as an Excel File.

What I want to do is format the Excel file before saving it. Does anybody
have an idea as to how I can programatically open and modify the
ActiveDocument in VBA and format it tru VBA?

Thanks

M. Hussaini


On Error GoTo Emsg

Dim doc As Document
Dim body As String
Dim ReportName As String
Dim locPath As String
Dim objExcel As Object
Dim myObjExcel As Excel.Worksheet
Dim myObjWorkBook As Excel.Workbooks


dDate = Format((Now() - 27), "mmmm dd, YYYY")

Set doc = ActiveDocument
doc.Refresh


locPath = " \\Fpptc01vgc02\O_drive\Sales\DomSales\Pr
ivate\Sales Reporting\"
ReportName = ActiveDocument.Name & ".xls"

'-----------------------------------------------------
'Deleteing old report
'------------------------------------------------------------

'Kill locPath & "\" & ReportName & ".xls"

'-----------------------------------------------------
'Saving report
'------------------------------------------------------------

doc.SaveAs (locPath & "\" & ReportName & ".xls")


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com