Operate C# to modify PPT's hyperlink, while configuring the hyperlink's text to display attribute, the address value will be assigned as null. Anyone know this issue? Any solution?

operate C# to modify PPT's hyperlink, while configuring the hyperlink's text to display attribute, the address value will be assigned as null.  Anyone know this issue? Any solution?
How to reproduce the issue:
1.Create a new PPT slide in Office2010.
2. Insert a certain text/characters, such as Mircosoft blablabla,
3. Insert an URL right after the text part , TextToDisplay is the “Test”,Address is the "Url".
4. The content in the ppt is ”Microsoft Test“,here "Test" is the hyperlink which we would like to convert. Please execute the code we list below.
5. The problem will be reproduced by the above steps.
PPT.Application ap = new PPT.Application();
PPT.Presentation pre = null;
pre = ap.Presentations.Open(mFileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
foreach (PPT.Slide mSlide in pre.Slides)
PPT.Hyperlinks links = mSlide.Hyperlinks;
for (int i = 1; i <= links.Count; i++)
PPT.Hyperlink mLink = links[i];
mLink.TextToDisplay = mLink.TextToDisplay.Replace(mLink.TextToDisplay,"url");
mLink.Address = mLink.Address.Replace(mLink.Address, "url");
Modify texttodisplay, the address vaule will be assigned as null. Anyone knows how to solve it?
Does it caused by a PPT API's Limitation?

I've tried the below code and it works, you can refer this article:
https://msdn.microsoft.com/en-us/library/office/ff745021.aspx
to find that the hyperlink needs to be associated with a text range, and thats what I did in the code below with the help of the link sent by Tony.
Microsoft.Office.Interop.PowerPoint.Application ap = new Application();
Microsoft.Office.Interop.PowerPoint.Presentation pre = null;
pre = ap.Presentations.Open(@"C:\Users\Fouad\Desktop\abcc.pptx", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
foreach (Microsoft.Office.Interop.PowerPoint.Slide mSlide in pre.Slides)
Microsoft.Office.Interop.PowerPoint.Hyperlinks links = mSlide.Hyperlinks;
Microsoft.Office.Interop.PowerPoint.Shape textShape = mSlide.Shapes[1];
for (int i = 1; i <= links.Count; i++)
Microsoft.Office.Interop.PowerPoint.Hyperlink mLink = links[i];
Microsoft.Office.Interop.PowerPoint.TextRange range1 = textShape.TextFrame.TextRange;
TextRange oTxtRng = range1.Find(((Microsoft.Office.Interop.PowerPoint.Hyperlink)mLink).TextToDisplay,After:range1.Start,WholeWords:Microsoft.Office.Core.MsoTriState.msoTrue);
oTxtRng.Replace(((Microsoft.Office.Interop.PowerPoint.Hyperlink)mLink).TextToDisplay, "url");
oTxtRng.ActionSettings[Microsoft.Office.Interop.PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = "http://www.microsoft.com";
Fouad Roumieh

Similar Messages

  • While Creating New Insert Form Existing Data Display from the Table

    Hi
    I am New To Sun Java Studio Creator and New to Java Also While Creating New Insert Form Existing Data Display from the Table while i am Run the Form. Can any one help me to Solve this one

    Dear Giri,
    As per your Advise, Literally I have Search the Properties for the Components to set value Null, but I am Unable to find the Value in Properties palate. I have tried in various options like
    In the Properties Palate
    TextField1_onselect use Value null
    TextField1_text I have selected use Value option and I have manually Keyed-in null;
    In the JSP Page, I have manually keyed in the null value below said
    <ui:textField binding="#{BI.textField2}" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
    <ui:textField binding="#{BI.textField2.Value = null }" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
    At last I am Failure. I am ignorant of it. Can you please help me on this where I have to set null value for the components? I will be very kind of you

  • Disk utilities said "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired. " anyone know what that is?

    disk utilities said "Warning: SUID file “System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent” has been modified and will not be repaired. " anyone know what that is?

    You don't have to repair it. http://support.apple.com/kb/TS1448

  • While making or disconnecting the calls, signals disappear and phone become unreachable, has anyone faced this issue or any resolution to it ?

    While making or disconnecting the calls, signals disappear and phone become unreachable, has anyone faced this issue or any resolution to it ?

    Boot on safe mode and check again 
    http://talk.sonymobile.com/t5/FAQ/How-to-boot-your-phone-into-safe-mode/m-p/348008#U348008
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • Am facing problem while buying app in appstore during payment . Getting message as" your payment is declined"- please help me solve this issue

    am facing problem while buying app in appstore during payment . Getting message as" your payment is declined"- please help me solve this issue

    If your payment method is not accepted, here is the formal Apple guidance on the situation.   iTunes Store: Changing account information

  • Right click on mouse while writing pastes last copied text instead of opening the menu

    right mouse click while writing text is pasting last copied text in instead of opening the menu

    Problem solved.

  • When i open cellular data from iPhone..it goes from 4g to 3g instantly an then after a while it goes to 4g..and the same thing again when i turn it back on..that didn't occured with ios7..does anyone have this issue?

    I don't think it's normal because it connects to 4g without data on and then when it's on it goes to 3g until it reconnects to 4g..i don't know what to do!

    No. You have no alternative but to plug it into a computer running iTunes and restore it.

  • Created date&created by ar being modified in Record history while updating.

    Dear friends
    We will appreciate if you can advise on this issue.
    While updating user responsibilities on on OEBS 11.5.10 (DB 9.2.0.5) we noticed that the created date and created by in Record history is also being modified.
    Thanks to advise.
    Regards
    Kamlesh

    Kamlesh,
    Our environment is on the 11.5.10 version with 9.2.0.5 DB.
    Can someone help us to find a fix to solve the error Wf_local_user_roles.Creation_date Gets Updated To Sysdate When Updating UserAre you asking for unsupported solution?
    As per support its a bug and the fix provided requires an upgrade.Please update the SR and ask Oracle support for a workaround. If no workaround exists, then I would not suggest any other workaround and you would need to consider upgrading and/or applying the patch which fix the issue.
    Thanks,
    Hussein

  • I keep getting an error message while downloading music i purchased, how do i solve this issue

    Hi All, can you please help. I am struggling to dowload 3 songs from an album i just bought on iTunes. It keeps giving me an error message. What should i do?

    You may be able to determine the reason for this error by examining your Mac's logs with Console. To do that find the Console app - it is in your Utilities folder and looks like this
    You can find it by selecting Utilities from the Finder's Go menu.
    Open Console.
    If the log list column on the left is not already displayed, show the log list by selecting Show Log List from Console's View menu.
    Locate system.log in the list and select it. Many date and time-stamped entries will appear, hundreds of them, and you must find the entries relevant to your Mac's problem. To do that choose Clear Display from Console's toolbar. Leave Console running while you choose Print from iPhoto again. Examine any new entries logged in Console. If there are any, copy and paste them in a reply.

  • Error while configuring talent profile for ESS

    Dear Experts
    I am having following error while configuring talent profile for ESS:
    The URL http://pplkhidr05.ppl.com.pk:8000/sap/bc/webdynpro/sap/hrtmc_employee_profile was not called due to an error.
    Note
    The following error text was processed in the system TRG : Access via 'NULL' object reference not possible.
    The error occurred on the application server PPLKHIDR05_TRG_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_PLVAR of program /1BCWDY/81IYQOEI3SKMOOB9TXW5==CP
    Method: IWCI_HRTMC_TP_SHARED_DATA~GET_PLVAR of program /1BCWDY/81IYQOEI3SKMOOB9TXW5==CP
    Method: OVERRIDE_EVENT_OIF of program /1BCWDY/828X5HC99194NVUUKJ30==CP
    Method: IWCI_IF_FPM_OIF_CONF_EXIT~OVERRIDE_EVENT_OIF of program /1BCWDY/828X5HC99194NVUUKJ30==CP
    Method: GET_UIBBS_FOR_EVENT of program /1BCWDY/7V06LYNNPH3D2G2T1W0Z==CP
    Method: IWCI_IF_FPM_FLOORPLAN_COMP~GET_UIBBS_FOR_EVENT of program /1BCWDY/7V06LYNNPH3D2G2T1W0Z==CP
    Method: IF_FPM_FLOORPLAN~GET_UIBBS_FOR_EVENT of program CL_FPM_OIF_INTERNAL===========CP
    Method: GET_NEXT_UIBBS of program CL_FPM========================CP
    Method: PROCESS_EVENT of program CL_FPM========================CP
    Method: RUN_EVENT_LOOP of program CL_FPM========================CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system TRG in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server PPLKHIDR05_TRG_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server PPLKHIDR05_TRG_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Any suggestions on how to resolve the error?
    Regards
    Imran

    Imran,
    check this thread
    http://forums.sdn.sap.com/click.jspa?searchID=43957204&messageID=8996092
    Thanks
    Bala Duvvuri

  • Error while changing the Display Attribute into Navigational Attribute

    Hi all.. Gud Mrng.
    I was changed the attribute (product) from display attribute into navigational attribute and while save and activating the info object it is not getting activated and it is throwing the below error message.
    Error Message: u201CThe Info object is being used in several data targetsu201D
    My Questions:
    i)     Do I need to delete the data from all the data targets (where this info object is using)??
    ii)     Do I need to delete data only from the main info object (Zmaterial)? Is this single action enough?
    Please suggest me which action I need to follow & What are the precautions need to take while changing the Display Attribute (product) into Navigational attribute of info object (Zmaterial).
    Thanks in advance.
    Thanks & Regards,
    B Venugopal

    Hi Garima
    Only in case of key figures we cannot change it from display to navigational.
    If the info object is a characteristics then in the General tab of the info object if you select 'attribute only' then the iobj would be a display attribute only. If you leave it unmarked then you can use the iobj as a navigational atribute.
    I am sure you know that these settings only mean if a IOBJ can be used as display or navigational.  To  use it as a navigational within another object you will have to change the settings from 'DIS' to 'NAV' for the said info object in the 'Attributes' tab of its parent info object.
    Further if you use the parent info object in any data target / infio provider you will have to further mark the info object as 'navigational' while defining the attrbute of the said data target / info provider. The info object gets displayed in the data target / info provider attribute properties as 'parent IOBJ_info object'
    Cheers
    Umesh

  • OBIEE 11g installation error while configuring (opmnctl error)

    While installing OBIEE 11g (11.1.1.3.0),(32-bit) we have choosen software only install and the software was installed successfully. While configuring in 10 th step we are getting the following errors.
    We have installed webserver before installing OBIEE 11g.
    OS is Windows server 2008
    Executing: opmnctl start coreapplication_obips1 falied and
    Executing: opmnctl start coreapplication_obisch1.
    we are using dynamic IP address

    Thanks, It worked. I unzipped all the folders in a single folder and then with the single Setup.exe it automatically loaded the complete software.
    Best Way - Import all the download file into a single folder and run the .exe
    Thanks,
    Raman

  • Query while configuring foreign server in JMS module

    Hi All,
    I'm configuring foreign server in my weblogic 10.3 to access the queues in the remote weblogic server 10.3. while configuring the foreign server it is asking for the destination and connection factory JNDIs for both local and remote server. My question is whatever JNDI we gave for the local destination or connection factory whether it should be already existing one or do we need to give that JNDI value unique for that Foreign server. I mean whether we have to create queue and connection factory and use their JNDIs or no need to create queues and connection factory and directly giving the JNDI names.
    And one more question is while configuring JMS adapter in Jdev11g what should be the JNDI name to be given in the JMS adapter configuration wizard.
    Thanks.

    my scenario is I have created a queue and connection factory in one weblogic server A and i have created foreign server in other weblogic server B and using the unique local JNDI names and JNDI names of B in remote JNDI for destination and connection factory tabs. Now in the deployment plan i have created one connection pool in the resource adapter(in my scenario it is JMS adapter) where i have gave the connection factory as local JNDI connection factory.
    Now I created one composite in which i have created one JMS adapter to place data into the queue and deployed the composite. when executing the composite i'm getting an error saying that the resource adapter could not able to find the JNDI name.

  • Halo, i hav an ipad2 version 4.3.5. now i went for updating it and while updating it shows error 4005. Pls help me in fixing this issue

    halo, iam using an ipad 2 and it was in version 4.3.5. Thought of updating it and went for it. While updating it shows error 4005 and i couldnt fix it. Can some one help me to fix this issue.

    You've tried the other things on those pages e.g. tried a different USB port on your computer and a different cable, tried the other pages that the first link
    If there’s an issue with the USB port, cable, dock, or hub, or if the device becomes disconnected during restore, try troubleshooting the USB connection, then troubleshooting your security software.
    If you checked your connections and are still seeing the error message, check for hardware issues.
    Check for hardware issues
    Related errors: 1, 3, 10, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1000, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
    Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the error message when you update or restore, contact Apple support.
    Do you have a different computer that you could try ?
    If you continue to see error 4005, 4013, or 4014 when you restore your device, contact Apple for support.

  • Cannot find Connector type while configuring UWS

    Hi,
           Am inplementing ESS/MSS for EP 7.01 SP6. While Configuring Universal Worklist systems, Am unable to find the connecter type SomProviderConnector.
    Appreciate your help...

    Hi Mcsekar,
    Adding to Koti..
    SONiC connector is usefull for Configuring Universal Worklist systems. You need to deploy SONiC SDA file in the J2EE server and then you need to configure using SAP PDF document u2018How To Install SAP Office Connectoru2019.
    For Testing
    Then Log into R3 system and run transaction SWUI.
    Select workflow WF_VERIFY032 and press the Start Button.
    Select u201CAs Internal Mailu201D from the options on the next screen.
    You should see the message u201CWorkflow Startedu201D.
    Navigate to transaction SBWP (SAP Business Workplace) an check that a new notification appears in the user inbox.
    Log into the portal (with the same user) and navigate to the Universal Worklist (UWL). Ensure that the UWL iView is configured to connect to the SONiC service. Now the new notification item should appear on the Notifications tab of the UWL.
    Hope it helps
    Regards
    Arun

Maybe you are looking for

  • Free Good Qty as non modifiable field in the Sales Order Level

    Dear Friends, I have successfully done the config change for the Free Goods, But now i want make the free good line item qty as a non modifiable field in the Sales Order Level. How can i do this.. Please advice. Thank U, Uwanthi

  • Windows 8: Bit Locker encrypted drive "Not Found" or "Access Denied"

    I just upgraded my Windows 7 Ultimate to Windows 8 Pro. C drive is not Bit locker protected, but D drive is. When I go to Computer and double click on D drive, it tells me one of two errors: 1) Application Not Found (more common), or 2) Access is Den

  • ITunes 11 x iOS 6 Playlist Sorting Fiasco continued...

    I know people have been complaining about this for ages and after reading 50 posts I can't seem to find an answer or solution so I'll ask here and see if someone can help. Why can't my iOS device (6.0 iPhone 5) sort my Playlists in the same order in

  • CSS11503- Sticky-cookie not working as expected

    Hi I have a CSS11503 providing load balancing for an application. There are two servers to be load balanced. The CSS5-SSL-C-K9 hardware SSL installed on it. I have configured the following services and css service RESWINCOBBTAPP1_HTTP keepalive uri "

  • Parallelized transfer

    Hi Can any one explain what is parallelized transfer in the screen CFM2 transaction(activation or deactivation integration model). What is the use of this and how we can use for better performance. What must be the values for 1.Absolute Max no of pro