Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 3 Sep 2007 05:24:22 -0700,    group: microsoft.public.word.oleinterop        back       


Problem saving a word document using DSOFramer ActiveX control   
Hi,

I am developing a windows application which needs word and visio application 
to be embedded on to a form.  I am using DSOFramer Active-X control. 

My application reads data from the database (a BLOB Field - that contains 
the word or visio document as byte array) and creates a temporary file in the 
local directory and then opens that file using DSOFramer control. 
(http://support.microsoft.com/kb/311765)


All the manipulations are stored on the same temporary file and update the 
file contents on to that database on save (as BLOB). 

After the temporary file is saved, I am opening the temporary file using 
IO.FileStream and reading the contents to byte() and updating the database 
with new binary data(BLOB Field) 

It works fine most of the time but some times while saving the word document 
it through an exception - "the target of an invocation"

Inner Exception -System.Runtime.InteropServices.COMException (0x80030021): A 
lock violation has occurred.

I hope this explains wat I am trying to do.

Please could any one tell me where I am going wrong.

Thanks in advance

chirantan
date: Mon, 3 Sep 2007 05:24:22 -0700   author:   Ram

Re: Problem saving a word document using DSOFramer ActiveX control   
I am also working on similar functionality. Please share your code How to 
open a Word document in DSOFramer?

Thank you

"Ram"  wrote in message 
news:FCBA75C2-4FF4-4C3E-9F52-3CA847A9BA9C@microsoft.com...
> Hi,
>
> I am developing a windows application which needs word and visio 
> application
> to be embedded on to a form.  I am using DSOFramer Active-X control.
>
> My application reads data from the database (a BLOB Field - that contains
> the word or visio document as byte array) and creates a temporary file in 
> the
> local directory and then opens that file using DSOFramer control.
> (http://support.microsoft.com/kb/311765)
>
>
> All the manipulations are stored on the same temporary file and update the
> file contents on to that database on save (as BLOB).
>
> After the temporary file is saved, I am opening the temporary file using
> IO.FileStream and reading the contents to byte() and updating the database
> with new binary data(BLOB Field)
>
> It works fine most of the time but some times while saving the word 
> document
> it through an exception - "the target of an invocation"
>
> Inner Exception -System.Runtime.InteropServices.COMException (0x80030021): 
> A
> lock violation has occurred.
>
> I hope this explains wat I am trying to do.
>
> Please could any one tell me where I am going wrong.
>
> Thanks in advance
>
> chirantan
>
date: Thu, 27 Sep 2007 11:08:33 +0530   author:   Bhaskar

Re: Problem saving a word document using DSOFramer ActiveX control   
Hi Bhaskar,

you can use the following method to open an existing file.

first argument  - file (with full path)
second arg - determins weather you open in read mode 
third arg - type of file you are woking with in this case its word document
the last two arg - are missing as its is for web based application

AxFramerControl1.Open(strFileLocation, False, "Word.Document", Type.Missing, 
Type.Missing)


I hope this helps



"Bhaskar" wrote:

> I am also working on similar functionality. Please share your code How to 
> open a Word document in DSOFramer?
> 
> Thank you
> 
> "Ram"  wrote in message 
> news:FCBA75C2-4FF4-4C3E-9F52-3CA847A9BA9C@microsoft.com...
> > Hi,
> >
> > I am developing a windows application which needs word and visio 
> > application
> > to be embedded on to a form.  I am using DSOFramer Active-X control.
> >
> > My application reads data from the database (a BLOB Field - that contains
> > the word or visio document as byte array) and creates a temporary file in 
> > the
> > local directory and then opens that file using DSOFramer control.
> > (http://support.microsoft.com/kb/311765)
> >
> >
> > All the manipulations are stored on the same temporary file and update the
> > file contents on to that database on save (as BLOB).
> >
> > After the temporary file is saved, I am opening the temporary file using
> > IO.FileStream and reading the contents to byte() and updating the database
> > with new binary data(BLOB Field)
> >
> > It works fine most of the time but some times while saving the word 
> > document
> > it through an exception - "the target of an invocation"
> >
> > Inner Exception -System.Runtime.InteropServices.COMException (0x80030021): 
> > A
> > lock violation has occurred.
> >
> > I hope this explains wat I am trying to do.
> >
> > Please could any one tell me where I am going wrong.
> >
> > Thanks in advance
> >
> > chirantan
> > 
> 
> 
>
date: Thu, 27 Sep 2007 05:10:06 -0700   author:   Ram

Re: Problem saving a word document using DSOFramer ActiveX control   
Thanks Ram,
I am working on ASP.net application . I tried your code its working on 
Windows foms(after making small changes).

My requirment is
1)Loading  Document from DB to DSOFramer
2)Editing that Document and save it into DB again
3) I want to add a context menu to the DSO or adding menu to the Word doc( 
My menu contains info about custom merge fields)
4) I will add those merge fields to teh Docuiment and generate teh Document 
from Address DB.

I am curious about 1 & 2 later. Please help me .

once again thanks for extending your help.

Bhaskar

"Ram"  wrote in message 
news:E2316D8F-A8E4-4F7C-9685-1EF3F568A783@microsoft.com...
> Hi Bhaskar,
>
> you can use the following method to open an existing file.
>
> first argument  - file (with full path)
> second arg - determins weather you open in read mode
> third arg - type of file you are woking with in this case its word 
> document
> the last two arg - are missing as its is for web based application
>
> AxFramerControl1.Open(strFileLocation, False, "Word.Document", 
> Type.Missing,
> Type.Missing)
>
>
> I hope this helps
>
>
>
> "Bhaskar" wrote:
>
>> I am also working on similar functionality. Please share your code How to
>> open a Word document in DSOFramer?
>>
>> Thank you
>>
>> "Ram"  wrote in message
>> news:FCBA75C2-4FF4-4C3E-9F52-3CA847A9BA9C@microsoft.com...
>> > Hi,
>> >
>> > I am developing a windows application which needs word and visio
>> > application
>> > to be embedded on to a form.  I am using DSOFramer Active-X control.
>> >
>> > My application reads data from the database (a BLOB Field - that 
>> > contains
>> > the word or visio document as byte array) and creates a temporary file 
>> > in
>> > the
>> > local directory and then opens that file using DSOFramer control.
>> > (http://support.microsoft.com/kb/311765)
>> >
>> >
>> > All the manipulations are stored on the same temporary file and update 
>> > the
>> > file contents on to that database on save (as BLOB).
>> >
>> > After the temporary file is saved, I am opening the temporary file 
>> > using
>> > IO.FileStream and reading the contents to byte() and updating the 
>> > database
>> > with new binary data(BLOB Field)
>> >
>> > It works fine most of the time but some times while saving the word
>> > document
>> > it through an exception - "the target of an invocation"
>> >
>> > Inner Exception -System.Runtime.InteropServices.COMException 
>> > (0x80030021):
>> > A
>> > lock violation has occurred.
>> >
>> > I hope this explains wat I am trying to do.
>> >
>> > Please could any one tell me where I am going wrong.
>> >
>> > Thanks in advance
>> >
>> > chirantan
>> >
>>
>>
>>
date: Fri, 28 Sep 2007 11:00:02 +0530   author:   Bhaskar

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us