none
Differing behaviour of VB.net's handling of .Application between Word 2013 and Word 2016 RRS feed

  • Question

  • Hi,

    I am assigning the Word office application to an Application variable called L_V_Scalar_Application_Generic which is obtained with the below function.

    This worked perfectly in Word 2013 - see the first screen print.

    After upgrading to Word 2016, almost all attributes of my variable are now just a question mark - see the second screen print.

    The online documentation for Application seems to have changed between these versions of Office:

    Office 2013: https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.application(v=office.14).aspx

    Office 2015: https://msdn.microsoft.com/en-us/library/ms262863(v=office.15).aspx

    I think that this is the cause of my problem, but I am not able to decipher exactly what the issue is or how to resolve it. Any help would be greatly appreciated!

    Many thanks in advance,

    Keith

    Public Shared Function G_F_Scalar_Application_GetReferenceToExistingOrNewIfThereIsNoExisting() As Application
    			Dim L_V_Scalar_Application_Generic As Application
    			Try
    				L_V_Scalar_Application_Generic = DirectCast(
    					System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application"),
    					Application
    				)
    			Catch L_V_Scalar_Exception_Generic As System.Exception
    				L_V_Scalar_Application_Generic = DirectCast(
    					Microsoft.VisualBasic.CreateObject("Word.Application"),
    					Application
    				)
    				L_V_Scalar_Application_Generic.Visible = False
    				L_V_Scalar_Application_Generic.DisplayAlerts = WdAlertLevel.wdAlertsNone
    			End Try
    			Return L_V_Scalar_Application_Generic
    		End Function


    R K Howard

    Monday, July 25, 2016 11:10 AM

Answers

  • >>>After upgrading to Word 2016, almost all attributes of my variable are now just a question mark - see the second screen print.

    According to your description, I have reproduced this issue, but I am not able to find any solution to overcome this issue.
     
    So I suggest that you could submit any feedback to Word UserVoice:

    https://word.uservoice.com/

    Thanks for your understanding.
    Tuesday, July 26, 2016 8:09 AM

All replies

  • >>>After upgrading to Word 2016, almost all attributes of my variable are now just a question mark - see the second screen print.

    According to your description, I have reproduced this issue, but I am not able to find any solution to overcome this issue.
     
    So I suggest that you could submit any feedback to Word UserVoice:

    https://word.uservoice.com/

    Thanks for your understanding.
    Tuesday, July 26, 2016 8:09 AM
  • Hi David,

    I'm very sad to hear that!

    Is there a Word equivalent of User Voice?

    Thanks,

    Keith


    R K Howard

    Tuesday, July 26, 2016 11:47 AM
  • Hi Keith,

    Sorry for my mistake that I provide icorrect UserVoice, I have corrected it.

    Thanks for your understanding.
    Wednesday, July 27, 2016 1:36 AM