Link to home
Start Free TrialLog in
Avatar of Fixzy
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
ASKER CERTIFIED SOLUTION
Avatar of raidos
raidos

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fixzy
Fixzy

ASKER

All I get is ----> Interface not supported

:(

/Fixzy
Sorry about the delay...

You need to call
  OleContainer.DoVerb(ovShow);

When you have loaded your ContainerDocument....

Regards
//raidos
Avatar of Fixzy

ASKER

Thanx....now the slide numbering works.

But  OleContainer.OleObject.PrintOut(BackGround := TRUE); does not work the method PrintOut is not supported *argh*...starting to disslike OLE :(.
By the way, I use D4
Avatar of Fixzy

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
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.Application');
  WordApp.Visible := FALSE;
  WordApp.Documents.Open(FileName:='C:\Path\To\YourDoc.Doc'; ConfirmConversions:=FALSE; ReadOnly:=TRUE);
  WordApp.ActiveDocument.PrintOut(Background := TRUE);
  WordApp.Application.Quit(SaveChanges:=FALSE);
End;

Or something like that..

regards
//raidos