Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    vbnet


Advertisements:










Office Automation :: PowerPoint: Using Pres.SaveAs In PresentationBeforeSave Event?


I have created an addin specifically for Microsoft PowerPoint 2003 that will cature any save attempts made by the end-user. The purpose is it analyse where the file is saved to and to take a copy of the saved file for version control.I have created a module level object mobjPPT which contains my PowerPoint application object and have assigned the PresentationBeforeSave event to my sub 'PowerPointSave'. Everything works up until the point it hits the 'Pres.SaveAs' line and throws the following error:

System.Runtime.InteropServices.COMException (0x80004005): Presentation (unknown member) : Failed.
at Microsoft.Office.Interop.PowerPoint.PresentationClass.SaveAs(String FileName, PpSaveAsFileType FileFormat, MsoTriState EmbedTrueTypeFonts)
at PPTSave.Connect.PowerPointSave(Presentation Pres, Boolean& Cancel)

I have tried calling SaveAs on the mobjPPT object instead but get the same results.Here is the offending item:

Code:
Private Sub PowerPointSave(ByVal Pres As Presentation, ByRef Cancel As Boolean)
Dim dlgResult As DialogResult = Nothing
Dim dlgFilter As Microsoft.Office.Core.FileDialogFilters = Nothing

[code]....


View 1 Replies (Posted: 05-16-2011)

Sponsored Links:

Related Forum Messages For vbnet category:
Office Automation :: PowerPoint Won't Close?
I have a simple form, with a button that invokes some Powerpoint automation (I am using VB 2008; Office 2007 is installed on the machine). Powerpoint starts up properly, the presentation closes, but...Powerpoint stays "up" (does not quit). When my application eventually closes, powerpoint does close, but I would like for it to properly close right after the automation completes.

Code:
Imports Office = Microsoft.Office.Core
Imports Graph = Microsoft.Office.Interop.Graph

[code].....

Posted: 12-03-2009

View 3 Replies!   View Related
Office Automation :: Open Powerpoint And Get Notice When It Gets Closed?
I have been searching and trying for quite some time now but did not yet find the right way to solve my problem.Here is what I want to do:- open powerpoint with a file (an disable the UI of my app while it is opened)- make some changes to this file- save it with a new name- get notice when Powerpoint is closed (either by my app once the automatic changes are done or if the user quits Powerpoint)- enable UI once Powerpoint is closedThe notice is my problem. Is there an easy way (other than timers that check the process list) to get notice of when my started Powerpoint-Process is closed/quit?

Posted: 10-07-2010

View 1 Replies!   View Related
Office Automation :: Server Side .Net Using Interop With PowerPoint?
Here's the user environment: Microsoft 2003 Web Server Microsoft Visual Studio.Net 2005 (VB.Net) Microsoft Office PowerPoint 2003 We are attempting to use Interop in a web service to update PowerPoint presentations. It worked great on my laptop, but when we migrated to the server, we encountered issues.Basically, it started taking 10 or more minutes to open up the presentation, which means we usually time out.

[Code]...

Posted: 11-18-2010

View 2 Replies!   View Related
Word 2007 Automation SaveAs ?
I am creating new documents from templates and then saving them as docx files.My understanding is that when I go to my saveas method I should be able to have the wdFormatXMLDocument as one of my fileformat options.However I don't.I have to use the numerical equivalent of 12.I have imported the Word 2007 interop and have all the methods at my fingertips there, but can't seem to find this particular option.

Posted: April 20th, 2009

View 2 Replies!   View Related
Office Automation :: Excel Automation - Cannot Use Office PIAs
It appears that when one creates an instance of Excel, using CreateObject, (Late binding), the suggested Excel closing function (with GC.collect etc) does not work. I have tried several suggestions, and the only one that works is process.kill method. Do you see any problem in using this? BTW: the reason we are using late binding is that we cannot use Office PIAs....not sure which version of Office would be installed on the client site. We work with O2003, but the client might still be at 2000 or 2002.

Posted: 02-14-2009

View 7 Replies!   View Related
Office Automation :: Automatic Deployment Of Excel Automation Addin?
I have written an automation addin in Excel with C# (addin.dll). To use the addin, I need to 1. register it using "regasm /codebase c:...addin.dll"2. select in ExcelOptionsAddInsExcel AddinsAutomation the respective addin from the list

I would like to automatize 1) and 2), so that the user just needs to run an exe-file in order to use the addin. 1) should be no problem, but how can one automatize 2)?

Posted: 01-25-2011

View 12 Replies!   View Related
Office Automation :: Excel 2003 Automation With VB 2005 Express?
Ok basically what I need to do is the following:Read FirstExcelDoc (attached)For every row in that: Retrieve data from sql server db based on info in the Orange columns of FirstExcelDoc Let's say I retrieved data elements A, B, C, D, and E from sql server. Then I need to enter those same data elements A, B, and C in another excel spreadsheet (which has formulas etc) After inputing A, B, and C in that spreadsheet, read a couple of calculated fields and compare those results to data elements D and E retrieved originally from SQL Server DB. Finally, output the results in the Blue columns of the FirstExcelDoc spreadsheet for that row.Loop through and do the same thing for row 2 of the FirstExcelDoc and keep on until you see "END TEST" in the FirstExcelDoc.

I'm looking for a method of doing this efficiently. I have read several articles over the past few days as well as those from Mike R. but just need some direction to get started on this.To start of I'm looking for whether to read the entire FirstExcelDoc spreadsheet or just read the info for first policy number(2nd row) and process it and write out the blue column info for that row and then loop through and come back and read the second policy number (3rd row) etc... Please attach a code snippet for either way of reading the data.

Posted: 04-20-2010

View 19 Replies!   View Related
Office Automation :: Orphan Excel Process Started Via Automation
I'm using excel via interop in application.Sometimes users kill application that created excel instance and that results in excel instance sitting in memory without any chance of disposing it.First I tried to tackle this using ROT(running object table) looks like not all instances of excel are registered there.Than I tried to somehow mark excel process after it is started via interop.[code]This works as long as excel is visible but in my case excel window is invisible.All I need is to somehow mark process that started via automation with the parent PID, so that later I can kill it if parent does not exist.

Posted: 06-17-2009

View 19 Replies!   View Related
Office Automation :: PPT Automation = Multi-threading And RPC Server Unavailable
I have successfully automated a PowerPoint Metrics presentation with VB.Net. However, since there were many complicated calculations, it took quite some time to make the 120+ slide presentation - so I recently tried to revamp the application to be multi-threaded.

[Code]...

Posted: 04-16-2010

View 1 Replies!   View Related
Office Automation :: Word2007 Automation Without Word12 Object Library
I've got VS2008 and Office2010, but I don't have Office2007. Therefore, I have the Word14 Object Library but not the Word12 Object Library. Will the code that I create for Office2010 automation also work where clients only have Office2007 or will they have to upgrade their office suites?

Posted: 01-21-2012

View 1 Replies!   View Related
Refreshing Form During Powerpoint Automation
I have a VB 2008 Forms application which does Powerpoint automation.I am opening Powerpoint in a minimized window from within my app and am trying to periodically put update messages in a textbox on my main form while the automation is running (it takes a few minutes to complete), but my form window does not want to show these messages until the powerpoint operations are finished.It seems as if I need to force a window refresh or something on my windows form, but I'm unclear how to do that. Below is some code that I'm using that illustrates what I'm trying to do.When I run it, "Step One / Step Two / Step Three" do not show up on my textbox until after the Powerpoint automations are over.[code]

Posted: Dec 2nd, 2009

View 1 Replies!   View Related
Office Automation :: Excel Automation - Call Rejected
I have been pulling my hair out trying to fix this.

[Code]....

Posted: 12-17-2010

View 1 Replies!   View Related
Office Automation :: Excel Automation Causing: Rpc_e_serverfault
We have a vb program which is run on our server by scheduled task every day. The program opens about 30 excel files, refreshes the data connections, pivot tables and then saves the document in another location.

This may run fine for a couple days but sooner or later the process starts crashing, usually with this error: RPC_E_SERVERFAULT.

My question is, Is it expected that continually opening/closing/refreshing workbooks will inevitably cause the Excel object to crash at some point.

Posted: 06-01-2010

View 3 Replies!   View Related
Office Automation :: MultiThreading In MS Office 2007 (Excel, Outlook, Etc)?
i was wondering if someone could give me the final explanation on what i might be doing wrong here.I spent a lot of time reading around the net and the forum about how to add Threading capabilities to a VB project.

Nos, i've got .NET 4 installed, and i've added the system.tsr and mscorlib.dll files as reference in, say, Excel 2007 (see screenshot).However, when i try to make a thread with anything as basic as "Dim Thread1 As System.Threading.Thread", i get a user-defined type not found error.Indeed, when i use the object browser to see what's in the System file, theres nothing remotely linked to any Threading, and in the mscorlib file, nothing under "Threading" either, just a few Thread related functions, but nothing defining a data type

Posted: 03-28-2011

View 2 Replies!   View Related
Office Automation :: Uninstall Office Shared Addin Programatically?
I've developed shared addin for Microsoft Word. I distribute this addin with my application and using Inno setup for installation. The Inno setup installs my application and then runs "myAddin.msi" file in order to install addin.

how to uninstall this addin programatically?

Right now, in order to uninstall addin, the user has to to it manually through control panel.

Posted: 02-15-2011

View 2 Replies!   View Related
Call Was Rejected By Callee PowerPoint Automation?
I have a commandbar model which automates PowerPoint. I recently faced a strange problem that when PowerPoint is opened through my application, and the data is being loaded through my application to populate the menu.If a user right clicks on PowerPoint I get the error message: Call was rejected by callee powerpoint

How do I resolve this? I'm using Office 2003/2007 and VB.NET for office automation.

Posted: Mar 4 10 at 12:50

View 1 Replies!   View Related
Office Automation :: Display Office Documents To Form?
how do i use the webbrowser to display the word or excel docs. just like the pdf viewer... i tried the webrowser1.navigate but it didnot work, if it does its opening a new window, im using office 2010..

Posted: 25 July 2010

View 4 Replies!   View Related
Office Automation :: How To Display Office Documents To Form
How do I use the webbrowser to display the word or excel docs. just like the pdf viewer. I tried the webrowser1.navigate but it didnot work, if it does its opening a new window, I am using office 2010.

Posted: 11-27-2011

View 1 Replies!   View Related
Office Automation :: Office Add-in For Word 2010 64bit?
I've made Add-in for Word 2007 in VS2005.It worked well with Word 2007 and now it works well with Word 2010 32 bit.However it doesn't work with Word 2010 64 bit. The installation is successful, but the ribbon button doesn't show up.

Do you have any experience with add-ins for Office 64 bit?

Posted: 12-21-2010

View 5 Replies!   View Related
Office Automation :: .net Automation Excel App Not Closing
I'm having an issue where my excel.exe process doesn't close until I close my .net application. I'd like to avoid using Process.Kill() if at all possible.

Code:

Private Sub WriteRowsToXls(ByVal rows As DataRowCollection, ByVal xlsPath As String, ByVal showStatus As Boolean, Optional ByVal AddTotals As Boolean = True)
Dim xlsApp As New Microsoft.Office.Interop.Excel.Application

[CODE]............

This method references a couple of other methods I use for repeated formatting tasks, I'll include those methods below. (I added the FinalReleaseComObject into the other methods after reading Mike's thread but the issue persists)

Code:
Private Sub SetRangeValidation(ByVal rng As Range)
With rng.Validation
.Delete()

[CODE]..............

Method SetRangeAllBorders does about the same as these other methods but my post is too long to add it. The only other things not shown in these code snippets are a few string variable that are defined in the class, studentWS, studentsWSPW, paymentsWS and paymentsWSPW My App creates an instance of the class, loads some data, runs the method above, and then sets the class to nothing. I'm using .NET 3.5 automating Excel 10

Posted: 09-25-2009

View 2 Replies!   View Related
Office Automation :: Automation Addin Requirements
I wrote a simple Automation Addin using VB.NET and .NET 4 and want to distribute it's dll to a

computer with xp sp2 and Office 2007 (Excel 2007) without I install .net on that computer, is it

possible?

Posted: 08-13-2011

View 2 Replies!   View Related
Office Automation :: Automation Of Word2010 With VB2008?
This might seem a ridiculous question but I just want to make 100% sure before I start committing any funds to software purchases. Can I use VB2008to develop automation routines to control Office2010 applications or must I absolutely use VB2010 to do so?I ask this because I installed an Office 2010 pro on my station which already has VB2008 and I do not have any Word14 reference in the COM section of the list of references...

Posted: 10-20-2011

View 1 Replies!   View Related
Office Automation :: Automating Office Under A Different Username From .net
I have used VB.NET and Microsoft Offices Interop to create an application that will run on a server and will print files for different users.My problem is that I need to find a way to impersonate different users so that when MS Word opens and prints, the resulting print job is recorded under that user. I found this link that lets you run .net code as a different user - unfortunately it doesn't work with this code. The username recorded is still the user that is logged on the server.Code Removed by moderator. Any ideas how I can make the Office app I'm automating run under a different user to the .net program that is calling it?

Posted: 09-08-2011

View 2 Replies!   View Related
Office Automation :: Shared Add-in For Microsoft Office
I would like to create Shared add-in that works with Word, Excel, Outlook and Power Point. I've found nice article that provides step by step instruction for creating shared add-in for Word: [URL] I've followed instructions and it worked. However, I am looking for a way to create one add-in that works with Word, Excel, Outlook and Power Point, not only Word. I didn't find any reference on the WEB.

Posted: 10-21-2011

View 7 Replies!   View Related
FAQ - Open / View Office Documents (Word - Excel - PowerPoint) Form?
How do I open/view Office documents (Word, Excel, PowerPoint) in a VB.NET Form? remember to mark the replies as answers if they and unmark them if they provide. Welcome to the All-In-One Code Framework! If you have any feedback,

Posted: April 10, 2009

View 1 Replies!   View Related
Office Automation :: VBA (XLA) Automation From C#?
Trying to Automate the VBA code from C#, the existing VBA code is a legacy code which has hundreds of nested calls within.Automate these VBA routines from C# and during the Automation there could be some COM objects which needs to transacted between VBA and C#.COM Objects currently have a Interoperability wrappers to C# and they are being developed in VB and C++?

Posted: 10-30-2009

View 2 Replies!   View Related
Using VS For MS Office Automation?
I've been researching a problem and am so overloaded I'm really lost now. I have to produce an insane amount of reports at work, different day, times.. You get the point. What I'd like to do is create an application where I can:

The windows application would be running all the time .At specific days and times, the application would sent an MS Excell file in Outlook as an attachment

All automatically. If I can get this working, I plan on adding a GUI to the application allowing many reports, at times and days I can set on the screen.

I'm not even sure if this is even possiable.If my application is too hard for a 5th grader to run, I've made too complicated"

Posted: June 13, 2012

View 3 Replies!   View Related
Office Automation :: .Net & Bloomberg API
I have a excel VBA program that extract data from bloomberg (when run on bloomberg enabled workstation). Currently thinking about converting the application from VBA to c#.net application that i can have a better control of the application.

I need some advice on the license issue of creating a intranet web service that draw data from Bloomberg (web service setup on bloomberg enable station).

Another problem i face is it very hard to find example or articles regarding this issue.where i could have a good grab on dealing with bloomberg API?

Posted: 09-16-2007

View 9 Replies!   View Related
Office Automation :: Add Row To Access Db
I have been going around and around about this and just can't seem to find the answer. I have an Access 2007 DB with 3 Tables I pull data from the first (STUDLIST) table to my form, I then pull data from the second(EQUIPINV) Table

complete my form, I now want to take my form data and create a new row in my third table(SignedOutEquipment)....(Yes I know that is duplicating data but overall it rally is not, there are reasons to do it this way) but this is where I am having my problem, My code runs with no errors and tells me it added a record but when I check my access DB there is no new record.

I am using visual Studio 2008 Express and access 2007[CODE...]

Posted: 01-05-2010

View 2 Replies!   View Related
Office Automation :: Last Row That Contains Data?
How do I get in VB2005 the last row in a open excel sheet that contains data

Posted: 07-28-2010

View 1 Replies!   View Related
Office Automation Using Excel And .Net?
when the worksheet is built i get the error message "Object reference not set to an instance of an object.".Here is my code:

Code:

Dim myXLApp As Excel.Application
Dim myXLWbs As Excel.Workbook
Dim myXLSht As Excel.Worksheet

[code]....

Posted: 08-07-2009

View 1 Replies!   View Related
Office Automation :: Automation Excel Without Install Excel
I am developing an application using excel automation.The worst thing is the client's side doesn't have excel installed.What is the solution for this case?

Posted: 05-28-2009

View 17 Replies!   View Related
Office Automation :: Add A Combobox To Excel
I am creating a new software with visual studio 2010 using the program language visual basic .NET, well in that software I create a new file in excel 2007, my question is because I do not know how I can create a combobox with data of my database inside, [code]

Posted: 06-19-2012

View 2 Replies!   View Related
Office Automation :: Add File To Msi Setup?
I want my Visual Basic.NET program to have a file in the startup path when installed.So I want the file to be in my msi Setup file.How can I add this file respectively where can I say that this file should be added to the setup file?I hope I posted this in the right section of this forum.

Posted: 02-21-2011

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved