How to check if there is a layout open for a document?

I want to check whether the document I have is hidden in In-design or there is a layout window open for it.
Is there a API to check this?
I looked into IDocumentPresentation but did not found any helpful API. Can some one suggest?

you can try: if doc is opened then active it
PMString strActiveDocumentName("ExampDoc");
  // Get opening document list
  InterfacePtr<IDocumentList> oDocumentList(oApplication->QueryDocumentList());
  if (oDocumentList)
  for(int32 i = 0; i < oDocumentList->GetDocCount() ; i++ )
  // Check document name
  IDocument* oDocument = oDocumentList->GetNthDoc(i);
  PMString strDocName;
  oDocument->GetName(strDocName);
  if(strActiveDocumentName == strDocName)
  // Get DocumentUIDRef
  UIDRef oDocumentUIDRef(nil, kInvalidUID);
  IDataBase* oDatabase = ::GetDataBase(oDocument);
  if (oDatabase == nil)
                            break;
  UID oDocumentUID = oDatabase->GetRootUID();
  if (oDocumentUID == kInvalidUID)
                            break;
  oDocumentUIDRef = UIDRef(oDatabase, oDocumentUID);
  // Make active document
  InterfacePtr<IPresentationList> oPresentationList(oDocumentUIDRef, UseDefaultIID());
  if( oPresentationList)
  for(int32 j = 0, iMax =  oPresentationList->size(); j < iMax; j++)
  IDocumentPresentation* oDocumentPresentation =  oPresentationList->At(j);
  oDocumentPresentation->MakeActive();
  return true;

Similar Messages

  • How to check if there is specific text in a word document ?

    Hello everyone ,
    I have a form include text box1  , I need to check a word document if  there is specific text inside it , if it’s true the textbox1.text = 1 , if it’s false the textbox1.text = 0 , and so on .
    to be clear I’m trying to check a lot of things not just specific text also ( font size , font color , font type , photo , table …………etc ) .
    I read a lot of threads about Office Automation , all about how to create a new documents and insert text tables photos….. etc, but what I need just to check if it existing or not
    Any idea , books, threads ,examples ….
    Thanks in advance.
    Visual Studio 2013
    office 2007

    "1- what if i need to check that word in the beginning of the second paragraph in that document or at the end of the third paragraph "
    to find a word in a paragraph, use the range keyword as in
    Dim rng As word.Range = objDoc.Paragraphs(1).Range
    rng.Find.Execute(FindText:="yourtext")
    " can you give me any website or books , to learn how to check  ( font size , font color , font type , photo , table
    …………etc ) and return with (1,0) or (true ,flase)."
    You can use the range object here aswell
    If rng.Font.Size = 7 Then TextBox1.Text = 1
    Look at this link for a multiple of examples about word automation
    https://msdn.microsoft.com/en-us/library/78whx7s6(v=vs.80).aspx

  • How to check whether there r new txt files in a folder n file creation date

    How to check whether there r new text files in a specified folder and what is the date of creation of the text file.........?

    Hi
    I have been searching for a solution to find the date of creation of a file for over 6 months now but haven't found it. So I presume that it is not possible though I havent found any authentication of my assumption in any document.
    Cheers!
    Shailesh

  • How to check if there is any problem in the interaction center inbox

    hi,
    how to check if there is any problem in the interaction inbox for recieving the attachments/cic0
    some users who are sending withattachments is not able to reach the sap indox./
    but without the attachments the mails are coming
    I want to know how we can able to find out were is the problem.
    thanks in advance
    Prajith P

    hi,
    Any update for the above query.
    Thanks & Regards
    Prajth P

  • Frozen warning located at upper left corner of pages app which says "There aren't any warnings for this document".

    Frozen warning located at upper left corner of pages app which says "There aren't any warnings for this document". Cannot seem to be able to close this window. It interferes with my ability to use pages, as it always remains in front of all documents I am working on. Any suggestions on how to remove this frozen warning?

    Usually it is not frozen as such it is just waiting for you to click on OK somewhere.
    Check if there isn't a button or window somewhere or whether Enter will clear it.
    Peter

  • Change to existing sales order - There is no incompletion data for sales document

    we have just started TM in our sandbox system. When we change an existing order we get the following message:
    There is no incompletion data for sales document and the order change does not get sent to tm.  Creating a new order and changing all works fine. Is there something to be done with existing orders?

    Hello John,
    Have you tried to use the report TMTRQINITIALSENDING?
    Rgs, Marcelo Lauria

  • How to check changes made in standerd layout set

    Hi abaper's
    How to check the changes made in the standard layout set , other than using Utilities--- -> Print preveiw ?

    Hi,
    In ABAP there is no chance to check the version managment of the script , the better option to get this is to develop a small tool  as follows:-
    Every time u release the request of a script or layout just import that layout with (layoutname_request) no in application server. and using this RSTXFCOM program u can check transported one with existing.
    Note: Everytime while checking transported one make it a local layout in RSTXFCOM we can check two layout differences.
    Thanks
    Pathan

  • How to check radio button on view  layout?

    Hi All,
            How to check on view layout whether a radiobutton is checked or not?
    Thanks & Regards,
    Rahul Rathi

    Use the below in layout, it should work..
    <%
                    DATA: rbg       TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
                  rbg ?= CL_HTMLB_MANAGER=>GET_DATA( request = request id = 'radio_id' name = 'radioButtonGroup' ).
    %>
    Here rbg->selection will have the selected radiobutton.
    <i>*Reward each useful answer</i>
    Raja T

  • How to check whether MRP run has been executed for a sales order or not

    Dear Experts,
    In Strategy:20, Make to Order scenario, I have run MRP for sales order in T Code:MD50,
    then how can I check whether MRP run has been executed for a sales order or not.  Is there any report where I can find some indication?
    Thanks and regards,
    Vikas

    Dear,
    In MTO scenario with Planning strategy group 20 in material master .
    After sales order is created, Run MRP , then planned order will be created then go to planned order details in MD04 or MD12 you will get sales order number in assigment tab.
    or check the Table PLAF field  PALTR ,and field name KDAUF its sales order, for all created planned order.
    Regards,
    R.Brahmankar

  • How to check the row level security in TOAD for oracle

    Hi ,
    for ex, i have 2 types of users
    normal user and super user
    super user can see the group set (some column name) created by normal user
    but normal user can not see the set created by super user
    this set crestion aslso has 3 types "U','P',S'
    P & S can be viewed by even normal user
    but U should not
    so here we are having some row level security for the normal user .....
    So, in TOAD for oracle how to check that......
    Let me know if i'm not clear

    Like
    I'm the super user....
    And some records are inserted to a table by different users ('a' , 'b', etc....)
    So,if user 'a' logins then he can be able to see only the records inserted by 'a' only...
    how to see in TOAD where such type of scripts (filter conditions) are written.....

  • HDD Health: How to check it? HD Tune Pro equivalent for Mac?

    hi all, i was just wondering if there's a Mac equivalent for HD Tune Pro. it's a Windows app i use to check for errors on hard drives. i want to check if an externall 1TB HDD has any bad sectors on it before i use time machine to backup my work. i want something that'll check for any small error -- i don't want something that'll just do a basic scan.
    thank you         

    ThunderCon wrote:
    but there's software that can do it on Windows so there must be something on the Mac.
    DiskUtility, DiskWarrior, TechTools, Genius, etc. etc. just do a google search. Most are paid apps except DiskUtility which is already built in and can be accessed from your reinstall partition. I personally don't bother with any except DiskUtility, but do keep a copy of DiskWarrior on hand just in case.
    Developers will convince you that you need all sorts of programs to check and repair most often manufactured disc ailments, but if you are one of those happy to pay, then that is your choice.
    Good Luck
    Pete

  • HT5878 how to check the detail of font being used for reading the file received by an email

    I received word file as an attachment with email on my iphone. I want to check the detail on font being used for reading the word file received as attachment in an email.
    Thanks

    You don't need to copy the cert out of your configuration. OpenSSL has an "s_client" subcommand which can open an SSL connection and verify the cert for you. It even knows how to do STARTTLS. Something like this ought to do it:
    openssl s_client -starttls smtp -CAfile /path/to/ca/file -connect your.ironport:25
    The /path/to/ca/file is necessary to provide openssl with a cache of root CA certs. You could use -CApath instead of -CAfile if you have a hashed directory of root CA certs instead of a single file containing them all.
    You can also point this at your partner's SMTP server as well.

  • How to check weather a remote port is open or closed by a firewall

    Hi,
    Need to check weather a remote port is open or closed by a firewall. can i use Java Socket class to do that?
    Is there any proper way?

    In general, there is no way to determine anything about the status of a firewall from the outside (unless you know one is running and you want to verify it's functioning correctly).
    When trying to connect to a socket, you might get a time-out, which means either the firewall is silently dropping packets or the server is down or too busy or that there is a network problem. Or your connection might be refused, which means either the firewall has denied your request or the server isn't listening on the port you specified.
    In most cases, you should only be interested in successful connections and not try to guess too much as to the cause of unsuccessful ones.

  • How to deal with "There was an error opening this document, the file is damaged and could not be"

    Hello, everyone:
    I open one pdf document with Adobe Reader 9.3, but it appeared that "There was an error opening this document, the file is damaged and could not be repaired".. and I found that another several pdf document in the same folder that I have not opened for a long time is also "damaged and could not be repaired".
    But in the same folder, other documents of different types are ok, does that mean there is something wrong with my hard drive?
    Has anyone else run into this issue or have any suggestions?
    Thank you very much

    It could be that the directory is damaged. It could be that at one time you had a virus that did damage, it is hard to say. Do you have a good backup?

  • How to check whether a file got read permissions for perticular user

    Problem: Let JRE is running with some x as effective user in LINUX then while checking file permission it is checking permission on that file for that x user.
    File f = new File(�file name�)
    if(f.exists())
         System.out.println(�exists�);
    Else
         System.out.println(�does not exists�);
    The above code prints exists only when x user have permissions on that file
    Requirement: I would like to check whether a file got read permissions for particular user i.e. whether y user got permissions on that file.
    Any help is appreciated

    In Linux a user has to have read permission on a file to even see that it exists. As a result, if a user (or a group to which they belong) doesn't have read access to the file File.exists() will return false. Windows which doesn't have as tightly controlled access to files will admit that a file exists whether it can be read or not.
    PS.
    This is proof that I should never answer a question off the top of my head when I haven't had my red bull yet. This is wrong. You will be able to see it if you have read and execute on the directory.
    thumps self in head
    Message was edited by:
    puckstopper31

Maybe you are looking for