Hi,
I have a word document that has attached(ie. embedded ) documents like word, ppt, pdf, etc.
I have to extract those embedded documents in the document through code. To extract embedded word document. I used the following code.
word = new Microsoft.Offic e.Interop.Word. Application();
doc = word.Documents. Open(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
doc.Activate();
int attachmentsCoun t = doc.InlineShape s.Count;
for (int i = 0; i < attachmentsCoun t; i++)
{
embedDoc = doc.InlineShape s;
tempDoc = (Document)embed Doc.OLEFormat.O bject;
tempDoc.SaveAs( ref tempFileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
}
I need help to extract other types of documents(gener ally all type of attachments).
Regards
Ayyanar
0 1294 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: grghoward |
last post by:
I am receiving a series of Microsoft Word documents from web clients
that they upload to my server. I need to convert them to XML to pass
through to another system. I have done this through Microsoft Word
2003 with the "Save as XML" option. Now the tricky part is that a
portion of these documents contains a numbered outline. Unfortunately,
I need to remove the numbering before passing the data to the next
system. Here is an example of...
|
by: mickeydisn |
last post by:
Sub: C++ Word automation Extract text
hello.
I want extact text form a word document using a visual c++ programme.
I have see a lot of documentation. and my analysis is that I must use a
"word automation".
I have foud a lot of exemple to use it but I need your precious help to
|
by: Chris Belcher |
last post by:
First some background...
The database tracks Action Items assigned to a group of 20 or so
managers. Once the assignment is created it is then emailed to each of
the managers that are included in the scope of the assignment. Among the
functions that it provides is the ability to embed the source documents
in the database using OLE. The user has requested the ability to forward
the source document with the email. The embedded documents...
|
by: Lewis Edward Moten III |
last post by:
I have a file that users can download through a web page protected by
forms authentication:
Download.aspx?ID=45
and within that file ...
FileInfo fileToDownload = new FileInfo(fileName);
|
by: Dave |
last post by:
Apologies for the newbie question. I have created a vb.net program for
my company that is designed to work with Word Templates (about forty of
them that we commonly use) that are selected by the user and populated
(with info from an Access database) at run-time, then saved as Word
documents. The program I have coded works fine -- it does what I need
it to do. But it has two problems: (1) it runs very slowly, and (2) it
does not seem to...
| |
by: Adam Faulkner via DotNetMonster.com |
last post by:
I want to create a method within a class that opens a Microsoft Word 2000
Document and has the facility to Create a new word document and then extract
a Page that exists within the original Word Document and save it to a new
Word Document.
I would need to generate a loop for each page found within a word document to
create a new word document and insert the existing page into the new word
document and then save as a new word document.
...
|
by: Gargi K |
last post by:
Hi,
I have been trying to open a word document on a button click event in C#
This is the code I am trying to use
object fileName = "C:\\test.doc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
|
by: JohanA |
last post by:
I´m using Apose.words to extract diagrams from word 2003 documents.
It´s no problem to iterate the embedded MSGraph.Chart.8 objects but I can´t read the data from them.
Anyone who knows how to do it?
Thank´s in advance!
Johan
|
by: Paul Mc |
last post by:
Hi all,
It's a little late in the day for me so please forgive as i need my bed.!!
The issue is i need to open a word doc (say "c:\temp.doc) and paste into it, but i only can work out how to open a NEW doc
' Creates a new document and pastes Clipboard contents.
' Saves the document in the Word directory and closes the
' document.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |