Most recent edit on 2005-08-29 17:45:42 by GroupsMBM [formatting of "code"]
Additions:
Problem description (mail from the userlist):
Select Virt O-MS Word Global (OLE) ("A") Type: Microsoft Word, Object name: Global, Automatic
Select Virt O-MS Word Application (OLE) ("B") Type: Microsoft Word, Object name: Application, None
Select Virt v-MS Word ObjectHandle ("C") Num 10
Select Virt v-COM Error ("D") Num N10
Remark "Check for Open WORD-session"
Update C Expr: COMHandleGet (A)
Block Cnd: (C=0)
Remark "Create New WORD Instance"
Update D Expr: COMObjCreate ('B'VAR)
Remark "Append to the existing Application"
Update D Expr: COMHandleSet ('B'VAR, C)
End Block
Deletions:
Problemdescription (mail from the userlist):
SV O-MS Word Global (OLE), Type: Microsoft Word, Object name: Global,
Automatic
SV O-MS Word Application (OLE), Type: Microsoft Word, Object name:
Application, NOne
SV v-MS Word ObjectHandle, Num 10
SV v-COM Error, Num N10
Check for Open WORD-session
UV v-MS Word ObjectHandle = COMHandleGet (O-MS Word Global)
Block (v-MS Word ObjectHandle=0)
Create New WORD Instance
UV v-COM Error = COMObjCreate ('O-MS Word Application'VAR)
Append to the existing Application
UV v-COM Error = COMHandleSet ('O-MS Word Application'VAR, v-MS Word
ObjectHandle)
End
Edited on 2005-08-17 23:05:59 by NorbertGutscher [un-wiki V-WordApplication]
Additions:
This is because i define my variable V-WordApplication (OLE) with the instantiation = automatic
If i have the handler i can refer to the object by ComHandleSet (variable, handle) or create a new instance.
Deletions:
This is because i define my variable "V-WordApplication" (OLE) with the instantiation = automatic
If i have the handler i can refer to the object by ComHandleSet (variable, handle) or create a new instance.
Edited on 2005-08-17 12:46:44 by FrankVanHerreweghe
Additions:
I am using word with OLE and everything is ok, i can open the file, print ...
</snip>
...and then you have to set it visible, open documents and activate it, etc....
Regards
Frank Van Herreweghe
Frank.van.herreweghe@telenet.be
Category
CategoryHowTo
Deletions:
I am using word with OLE and everything is ok, i can open the file, print ...
</snip>
...and then you have to set it visible and activate it etc....
Edited on 2005-08-17 12:44:42 by FrankVanHerreweghe
Additions:
Problemdescription (mail from the userlist):
<snip>
I am using word with OLE and everything is ok, i can open the file, print ...
My problem is, that everytime I open a worddocument, another word instance is created and the user get's two wordicons in the taskbar.
This is because i define my variable "V-WordApplication" (OLE) with the instantiation = automatic
How can i check if word is allready open and how can i get the handler?
If i have the handler i can refer to the object by ComHandleSet (variable, handle) or create a new instance.
</snip>
Solution:
Oldest known version of this page was edited on 2005-08-17 12:42:52 by FrankVanHerreweghe []
Page view:
How To open 1 WORD instance with several documents
Record Main:
SV O-MS Word Global (OLE), Type: Microsoft Word, Object name: Global,
Automatic
SV O-MS Word Application (OLE), Type: Microsoft Word, Object name:
Application, NOne
SV v-MS Word ObjectHandle, Num 10
SV v-COM Error, Num N10
Record Suffix:
Check for Open WORD-session
UV v-MS Word ObjectHandle = COMHandleGet (O-MS Word Global)
Block (v-MS Word ObjectHandle=0)
Create New WORD Instance
UV v-COM Error = COMObjCreate ('O-MS Word Application'VAR)
Block Else
Append to the existing Application
UV v-COM Error = COMHandleSet ('O-MS Word Application'VAR, v-MS Word
ObjectHandle)
End
...and then you have to set it visible and activate it etc....