Need hwnd for active document

I'm doing some automation with Windows forms, C# and the SDK. I use code like this to open a document in Acrobat 8.x (full version, not the reader)
string szPdfPathConst = "myfile.pdf";
avDoc =
new AcroAVDocClass();success = avDoc.Open(szPdfPathConst,
Now I want to close the document and open a different one in the same reader window using OpenInWindowEx. How do I get the hWnd handle?
- Ron

After much experimentation, this code works, but it does not work. It reports sucess and I can get a page count for each document I open, but it does not actually open the document in the active Adobe Professional Window. I have been able to fiddle with this and at least get a document to come up in a new professional window (by just executing avDoc.Open each time) but the user has to close the old one manually.
Guess I'll have to try some other method of getting this to do what I want which is to be able to display various pdf documents from a windows forms application in a window on a computer with adobe professional installed. I didn't think it would be this hard...
private void StartAcrobatIac(){
// mApp, avDoc and pdDoc objects are declared outside of this method
// so I can manipulate the document elsewhere, here is the code used
// CAcroApp mApp;
// mApp = new AcroAppClass();
// CAcroPDDoc pdDoc;
// CAcroAVDoc avDoc;
//user selected file name.
string szPdfPathConst = textBoxFileName.Text;
//variables
string szName;
int iNum = 0;
bool success;mApp.Show();
// will add error check
System.Diagnostics.
Process[] processes = System.Diagnostics.Process.GetProcessesByName("Acrobat");
// close the old file if open
if (avDoc != null){
mApp.CloseAllDocs();
//open the PDF
success = avDoc.OpenInWindowEx(szPdfPathConst, (
int)processes[0].Handle, (int)AVOpenParams.AV_PAGE_VIEW, 0, 0, 0, 0, 0, 0, 0);}
else
avDoc =
new AcroAVDocClass();
// try to use OpenInWindowEx here will fail.
success = avDoc.Open(szPdfPathConst,
"Adobe Acrobat Professional");}
if (success){
//set the pdDoc object and get some data
pdDoc = (
CAcroPDDoc)avDoc.GetPDDoc();iNum = pdDoc.GetNumPages();
szName = pdDoc.GetFileName();
//try to Show Acrobat doc again.. window is still blank with no document loaded
mApp.Show();
else
MessageBox.Show("document did not open");}

Similar Messages

  • I reset the ipad. hoping it would help. but still it needs password for activation. the owner already forgot password for icloud as well as password of the email since it was not used since 2011. help please.

    I reset the ipad. hoping it would help. but still it needs password for activation. the owner already forgot password for icloud as well as password of the email since it was not used since 2011. help please.

    Your sister can go to https://iforgot.apple.com/ and see if she can recover her password.
    There is nothing anybody else can do.

  • Need authorization for business document services attachment list with user status in ps claim for clm2 and clm3

    Dear Friends,
    client wants to restrict the attachment list changing, deletion after the user status sets to close in PS Claims for transaction clm2 and clm3.
    Currently any one can attach documents as GOS and delete even the claim is completed and status is closed.
    How can we restrict all users even who created the claim can not change create and delete attachment list documents once the claim is completed and approved and user status sets to closed.

    HI,
    what is the claim creation transaction in that 01 is for creation 02 is for edit and 03 for display so with the help of basis consultant you can assigned transaction in user's assigned role accordingly.
    But user who is authorize for create claim can not modified or edit once he save the job. this would be limitation.
    Regards,
    Sanjeev

  • HT201441 NEED HELP FOR ACTIVE PHONE

    HELLO AND GOOD DAY
    I AM SHIP CHANDLER AND SUPPLY CARGO VESSLES . I BUY ONE IPHONE 4 FROM ONE RUSSIAN CAPTAIN AND I'M NOT ACTIVE IT INSIDE THAT VESSLE AFTER THAT VESSLE SAIL I CHECK PHONE AND I TRY TO ACTIVE AND USE IT BUT I SEE THIS MESSAGE THIS PHONE IS CURRENTLY LINKED TO AN APPLE ID ([email protected]) I NEVER USE APPLE CELLPHONE BEFORE AND NEVER ACTIVE BEFORE ALSO PLEASE HELP ME TO ACTIVE THIS PHONE I HAVE SERIAL NUMBER AND IMEI ALSO I BUY IT IN BOX AND I DON'T KNOW HOW I CAN ACTIVE IT NOW AND I CAN NOT SEE THAT CAPTAIN BECOUSE THE VESSLE IS GO AND I DON'T KNOW HOW I CAN ACCESS TO HIM.
    PLEASE IF YOU CAN ACTIVE IT FOR ME OR HELP ME HOW I CAN ACTIVE IT .
    MY BEST REGARDS FOR YOU
    NADER DADGAR

    Please see these errors
    I am trying to push IDM Users into AD but getting these errors in AS Logs
    </Attribute>
    <Attribute name='originalAssignedLhPolicy' value='Default Identity Manager Account Policy'/>
    <Attribute name='password' value='change12345'/>
    <Attribute name='prevEffectiveLhPolicy' value='Default Identity Manager Account Policy'/>
    <Attribute name='questions'>
    <List>
    <Object name='Qa0ee8f8afc0293b6:77a34d0d:11eca669c58:-7e53'>
    <Attribute name='answerObfuscated' value='false'/>
    <Attribute name='id' value='a0ee8f8afc0293b6:77a34d0d:11eca669c58:-7e53'/>
    <Attribute name='loginInterface' value='UI_LOGIN_CONFIG_DISPLAY_NAME_ALL_INTERFACES'/>
    <Attribute name='question' value='What is your favorite pet&#39;s name?'/>
    </Object>
    </List>
    </Attribute>
    <Attribute name='resources'>
    <List>
    <String>AD</String>
    </List>
    </Attribute>
    <Attribute name='roleInfos'/>
    <Attribute name='selectedRoleType' value='AllRoleTypes'/>
    </Object>
    </Attribute>
    </Object>
    2009-01-12T17:15:56.108+0530: Error processing updates
    2009-01-12T17:15:56.108+0530: There was an error in activesync processing.
    2009-01-12T17:15:56.123+0530: java.lang.NullPointerException
    2009-01-12T17:15:56.342+0530: Looking for deletes with filter: (uSNChanged>=457812)
    2009-01-12T17:15:56.546+0530: Poll complete.
    2009-01-12T17:15:56.561+0530: SARunner: loop 423
    2009-01-12T17:15:56.655+0530: Started - Error, paused until Mon Jan 12 17:15:56 IST 2009
    2009-01-12T17:16:01.675+0530: Pause completed

  • Iphone needs sim for activation

    i have a question.. i've just updated my aunt's iphone 4... and when i open it it says that i need a sim card to activate it... the phone is from london.. it has no sim.. what will I do? thanks

    Even if you are just using it as essentially an iPod Touch, you need a SIM in it to activate it in iTunes (note this has nothing to do with cellular service, this is simply about activating the device in iTunes so you can sync, update and so on).
    The good news, is any microSIM should work - it just has to have one in the slot to complete the iTunes activation, and once activated, you can take the SIM back out.

  • HT1766 I lost SIM CARD TRAYER. I need one for activation my iphone 5c, can I buy it there?

    i made an appointment to buy SIM card trayer which I lost.
    Rep said I must visit one of tech/genius
    is it true that I must be there?
    I DO NOT KNOW WHAT IS IOS..SO I choose any of one

    Hi sharonheeja,
    Thanks for visiting Apple Support Communities.
    I recommend using this link to locate a nearby Apple Retail Store or Authorized Service Provider to help you:
    Find Locations
    https://locate.apple.com
    iOS is the operating system your iPhone uses. For more information, see this page:
    What is iOS
    https://www.apple.com/ios/what-is/
    Best,
    Jeremy

  • Data Ownership for Activity

    Hi All,
    I need to filter records according to user login (OCLG - UserSign) for "Activity" document (within Business Partners module). Have tried to use Data Ownership Exceptions - Excluded Forms, but try with no luck.
    May I know anyone use this before? Or any cutomization needed-SDK/Query + Formatted Search?
    Thanks.

    Dear
    This is a missing functionality.
    Ownership only can be applied on sales or purchasing  documents and sales opportunities in the header.
    Best Regards,
    Xiaodan AN

  • Need a Suggestion For implementing the Digital Signature For the Documents

    Hi,
    Currently I am working in a Document Management System. I need a Good Suggestion for how to implement a Digital Signature For the Documents.
    Thanks in Advance
    Sabarish V

    Hmm, if you are not using Oracle Payroll, what are you using for payroll? I am wondering why you could not use your payroll system, whatever it is, to handle this reimbursement program.
    Well, you may want to talk to Oracle support about how to handle this in Oracle iExpense. You can certainly handle advances for Expense Reports. You would then apply the advance to the expense report items. The catch is I don't think you can stop expense item entry after the adavance is satisfied. You would have to set up a work flow process of some kind to have the expense reports reviewed and only approve expenses that are applied to the advance, is what I am thinking. Not your ideal solution, but something to think about. It could be the Oracle folks might know of a sneaky way to handle this. What you are trying to do is unusual. Employee advances are common, but the idea of not being able to exceed the advance amount is what unusual about this. Normally you will accept any expenses over the advance amount and reimburse the employee for those extra amounts not advanced.
    Good luck.
    John Dickey

  • Hi, i have a new number and I'm trying to activate iMessage but i can't.  it is only saying waiting for activation,  i have tried a lot of times with not success.  i'm not sure if i need to replace the old one to this new one, or what do do. can you help

    Hi, i have a new number and I'm trying to activate iMessage but i can't.  it is only saying waiting for activation,  i have tried a lot of times with not success.  i'm not sure if i need to replace the old one to this new one, or what do do. can you help

    Troubleshooting iMessage activation:
    http://support.apple.com/kb/TS4268

  • What is the need of creating partner functions for sales document type.

    Hi SAP (SD-GURUS),
    Actually we create partner functions  before creating customer ex: sold to party, ship to party, bill to party, and payer.
    These partner functions are going to be copied into sales order while processing sales order.
    Again what is the need of creating partner functions for sales document type.
    Thanks&Regards
    sreenivas peruru

    There are some Partners you could enter at Sales ORder Level. E.g. Sales Person, Employee Responsible, Forwarding Agent, Broker, etc.
    Thus these partner Determination need to be carried out at Sales Order Level & not at Customer Master level.
    So we have to configure partner Determination for various levels e.g. Customer Master, Sales Order, Delivery level etc...
    Hope this helps...
    THanks,
    Jignesh Mehta

  • Hard drive died.  Need to reinstall on new laptop with windows 7 64 bit system,  Need to get activation code for CS3 Web Premium.

    Hard drive died.  Cannot uninstall CS3 to remove copy registration. Need to reinstall on new laptop with windows 7 64 bit system,  Need to get activation code for CS3 Web Premium.

    Thank you Bob.
    Just to clarify - in terms of backing up one set of these, would that just be so I had it on disk and didn't need to re-download from Adobe if the installation got corrupted somehow?  Or do I need a backup for some other reason?
    Thanks

  • Need to create a mass upload program for appraisal document creation for multiple employee

    Hi Expertise,
    I need to create a mass upload program for appraisal document creation for manager and his multiple employee
    at a time using tcode appcreate.
    Please help me out.
    Best regards,
    Priyaranjan

    Hi Priyaranjan,
    I think you can take the abap'ers help in creating the program. But u need to provide them the exact functionality and the required specifications in creating the appraisal document.
    Even tcode also u can get it prepared by Abap'ers.
    Thanks and Regards
    Balaji

  • Need to create a mass upload program for appraisal document creation for multiple employee in abap hr

    Hi Expertise,
    I need to create a mass upload program for appraisal document creation for manager and his multiple employee
    at a time using tcode appcreate.
    Please help me out.
    Best regards,
    Priyaranjan

    Hi,
    I have done appraisal document creation for bulk using txt file.
    this fm used for single for creation in standard tcode (phap_prepare):  'WZ_HRHAP_0DOC_WZ01_START'.
    So create ztcode  usinh this fm for single form then record BDC for this tcode and called this tcode in that bdc for bulk creation .
    While recording for single I have used manual option instead of automatic .

  • Need help for publishing web intelligence document (universe) into InfoView

    Post Author: mirage
    CA Forum: Publishing
    Hello all,
    I need help for publishing web intelligence document (universe) into InfoView.
    can't find this information in Business Objects Designer's Guide and in Business Objects Administrator Guide.
    Can somebody give short instructions how can I do it?
    Regards, Slava

    If the change between the 2 types of data has to happen dynamically during run time them
    1. Use 2 dataproviders
         a. Current
         b. Historic
    2. Merge the 2 dimensions
    3. Use Webi variable to switch between the measure of the current and historic universe
    Ex  if [year] < 2010 then historic.[expense] else current.[expense]
    Hope this helps,
    Divya

  • I have installed adobe pdf to get a document sent to me thru my employer and i put my password in and its still asking me for a document password do i need to set one up

    I have installed adobe pdf and put in my password and its still asking me for a document password in which I have no idea what it is

    So you put your password in when you installed it?
    If that's the case, that was just your administrator password used to allow the install. It has nothing to do with the document.
    If the document is asking for a password, you'll need to get that from the person that added a password to the pdf.
    If neither of the above helps, please give us more info on what you are attempting to do and what is going wrong. LEtting us know your version of Adobe Reader may also be helpful.

Maybe you are looking for

  • Where is the display filenames option in web gallery export?

    adobe bridge CS4, as i'm understanding this feature went away in later versions. Just trying to export a web gallery that will include the file name beneath of it. I thought the feature was non-existnant so I have spent a couple hunded bucks and abou

  • Offsets in variables

    Hi, I created a query using variable 0FPER for 0FISCPER and then created offsets to go to prior month from selection month. The result showed the selection month value for the prior month also. When I use the text variables, the values for selection

  • HT4628 all looks good but I keep getting "a connection timeout occurred"

    Driving me crazy! I did the zap of PRAM recommended - 2x but to no avail. Will try again. Tech support for the ISP has said all looks good and that it's a problem with my computer. I guess I will head to the library to see if I can get online there -

  • Editing the list of shared destinations

    When I first started creating hyperlinks in InDesign, I mistakenly marked some as shared destinations. I regularly use a few URLs as shared destinations, but now I have a lot of redundant ones clogging up the list. How can I edit InDesign's list of (

  • Unable to open admin console in either Ap server 9 PE or EE5SDK

    I am new to Java, and have recently installed ap server 9PE, as well as EE5SDK on my Windows XP platform. The problem is, I am unable to USE either program, because the admin console(s) show invalid username/password. I know that I used my email addr