Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments
Create Preview of Office Dokuments Create Preview of Office Dokuments
Create Preview of Office Dokuments
Go Back  Xtreme Visual Basic Talk > > > Create Preview of Office Dokuments


Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2005, 04:38 PM
BenniG BenniG is offline
Newcomer
 
Join Date: Feb 2005
Posts: 1
Question Create Preview of Office Dokuments


Hi,

I've little expierience in Office Automation on VB6, (extracting plain-text from excel,word,powerpoint) and I want to switch the Code to VB.NET and also add a new Feature: A Picture of the Preview of the Document.
I just want to save the little preview-picture of the document just like the picture the windows-explorer shows on the left side when you select an office-dokument.
Has anybody ever done this? Does this belong to office-automation or it this a special feature of the windows-explorer?

Many thanks
Benni
Reply With Quote
  #2  
Old 02-22-2005, 05:01 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

For Automating MS Office Applications from VB.Net, you could have a start at:

(1) VB.Net Office Automation FAQ
(2) Automating Office Programs with VB.Net / COM Interop

The PrintPreview setting, however, is a document-specific feature that I'm not sure how to access programmatically. My best guess would be to use DSOFile.exe, however, this doesn't look like a lot of fun.

If I were to do this, I would make a Template Workbook that had this setting turned on via Alt|File|Properties... then hit the 'Summary' Tab and then check off the 'Save Preview Picture' checkbox. Then save this Workbook, say calling it "PrevPicTemplate.xls" and that setting will "stick".

Now when you need to make a new Workbook and manipulate it programmatically, I would start with that Template workbook using:
Code:
Dim wb As Excel.Workbook wb = xlApp.Workbooks.Add(Template:="PrevPicTemplate.xls") ' etc. ' etc.
Whatever you add from this point, the 'Preview Picture' will be saved along with this workbook when you call wb.Save() or wb.SaveAs().

I hope this makes sense?
Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments Create Preview of Office Dokuments
Create Preview of Office Dokuments
Create Preview of Office Dokuments
 
Create Preview of Office Dokuments
Create Preview of Office Dokuments
 
-->