Fixzy
asked on
2 fast ones, powerpoint and word stuff
Hi all
1st Q: I have a ppt file in a OLEcontainer. Is there any way to get the pictures count (number of sheets in the pressentation)?
2nd Q: I also have a word file inside a OLEcontainer, the container is NOT visible, BUT i want to be able to pront the wordfile without making it visible.
Anyone?
Thanx
Fixzy
1st Q: I have a ppt file in a OLEcontainer. Is there any way to get the pictures count (number of sheets in the pressentation)?
2nd Q: I also have a word file inside a OLEcontainer, the container is NOT visible, BUT i want to be able to pront the wordfile without making it visible.
Anyone?
Thanx
Fixzy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry about the delay...
You need to call
OleContainer.DoVerb(ovShow );
When you have loaded your ContainerDocument....
Regards
//raidos
You need to call
OleContainer.DoVerb(ovShow
When you have loaded your ContainerDocument....
Regards
//raidos
ASKER
Thanx....now the slide numbering works.
But OleContainer.OleObject.Pri ntOut(Back Ground := TRUE); does not work the method PrintOut is not supported *argh*...starting to disslike OLE :(.
By the way, I use D4
But OleContainer.OleObject.Pri
By the way, I use D4
ASKER
Forget it...Now it works, I did not switch to a word file.
But it does not work if I set the OLE container to visible=false (I dont want the user to be able to open the word file, only to print it)
Fixzy
But it does not work if I set the OLE container to visible=false (I dont want the user to be able to open the word file, only to print it)
Fixzy
OLE Containers are the devil!!
Best suggestion i can come up with is don't do it in a container...do it in a regular ole object...
Uses ComObj;
Var
WordApp: Variant;
Begin
WordApp := CreateOleObject('Word.Appl ication');
WordApp.Visible := FALSE;
WordApp.Documents.Open(Fil eName:='C: \Path\To\Y ourDoc.Doc '; ConfirmConversions:=FALSE; ReadOnly:=TRUE);
WordApp.ActiveDocument.Pri ntOut(Back ground := TRUE);
WordApp.Application.Quit(S aveChanges :=FALSE);
End;
Or something like that..
regards
//raidos
Best suggestion i can come up with is don't do it in a container...do it in a regular ole object...
Uses ComObj;
Var
WordApp: Variant;
Begin
WordApp := CreateOleObject('Word.Appl
WordApp.Visible := FALSE;
WordApp.Documents.Open(Fil
WordApp.ActiveDocument.Pri
WordApp.Application.Quit(S
End;
Or something like that..
regards
//raidos
ASKER
:(
/Fixzy