ActiveX - Word - casting of the objects to the variants

Hello

I'm just getting used to the use of Active X to automate the tasks of MS Office. I have the full suite and report generation tool does some things, but there are many others that I have and I give X a go Active (that's basically what NOR do anyway).

I have problems with some of the methods they have a variant of entry type, but no one tells me what is the format of the Variant. For example, I give you this VI which seems to add a caption to an image. I see the following documentation from Microsoft, which tells me that:

Documentation of the method

Label
Type: System.Object

Required object. The legend label must be inserted. It may be one of the WdCaptionLabelID constants.

Title
Type: System.Object

Optional object. String to be inserted immediately after the caption (ignored if TitleAutoText is specified).

http://msdn.Microsoft.com/en-us/library/Microsoft.Office.Interop.Word.range.InsertCaption%28V=Office...

-So, I should get my variant such as "System.Object" (?). I could probably assume that the title is just a simple string, but where would know that officially? My guess will fail eventually.

Enum for type of legend:

http://msdn.Microsoft.com/en-us/library/Microsoft.Office.Interop.Word.WdCaptionLabelID%28V=Office.15...

-J' tried casting as a string and a number, or work (I guess an enum is a number, I tried 0,1,2)

Any help would be appreciated, even if this can be more Microsoft is not to document their structure of objects that the problem of NOR, we are working towards the same goal! It is possible that there is another mistake as to why this program does not work, but I still need the General method...

Note that you must have an input file specified to make the program work.

Thanks for your help,

Rik

rik_aspinall wrote:

(4) catch on the .NET support. The limitation was not good advertising.

(5) words, Interop, ActiveX, .NET and COM all seem to be things that make this technology works. In addition, .NET looks like he's trying to keep old technology goes, which is worrying for the long-term support. The fact that nobody does this simple and well documented as a solution means that I'll ask an open-ended question: this feature/technology becomes obsolete, and if so, what will replace it and when?

Thanks to tyk007 and bob for your help!

Rik

COM Interop in LabVIEW execution is tedious for a number of reasons - mainly because of the architectural design of many COM components. Their well-designed components are loosely coupled, but this often means a lot of calls on many objects - many of whom often optional parameters. My suggestion is to use a wrapping to LabVIEW .net is necessary. It is not that it is not possible to apply directly in LabVIEW (obviously), but you need a lot of infrastructure in your code to make sure that you don't lose that same coupling or, more importantly still, readability in your own extension of LabVIEW.

In your scenario, I would ask myself: is this interface that I am building a long-term solution or a code that I am likely to change often? If Yes, then you could encapsulate COM Interop calls, and actually create a façade allowing the final user (eg. LabVIEW) functionality you need via an interface determined, without exposing the interchangeable parts (COM Interop). However, you must be comfortable said creation .net assembly that can be intimidating if you don't have the experience.

http://en.Wikipedia.org/wiki/Facade_pattern

As future support goes - it's a really, really good thing that .net helps keep these old technologies going. Long term support becomes a growing concern for these markets (read - more commercial rather than consumer solutions) and there are millions of apps out there running currently running one of these technologies. It's one of the reasons why I have recommended to you than a façade may be the best solution in the long term - there is always a desktop API. A front will always provide the same interface, whatever it is, if the calling code is not affected when the fact of the way that you interface API.

PS: Windows 8 exposes the WinRT Basic programming framework, which is based mainly on the... COM I don't see not its predecessor going anywhere for many years yet.

Tags: NI Software

Similar Questions

  • Any ideas how can I insert a pdf into word, by using the option object to insert. However, the pdf file that I want to insert text and annotated lines, but once inserted comments do not appear?  any help would be greatly appreciated.

    Any ideas how can I insert a pdf into word, by using the option object to insert. However, the pdf file that I want to insert text and annotated lines, but once inserted comments do not appear?  any help would be greatly appreciated.

    You will need to find a forum for MS Word, since it is the software you are trying to manipulate in the present.  If you think that the treatment/creation of the PDF file plays a role, then you should ask in the forum for the software that you use to create the PDF file.

    This forum is for a question about downloading and installing Adobe products test, so in all circumstances, your question does not fit in this forum.

  • Adobe distorts 2010 Word headers on the pages in landscape mode

    I have a Word 2010 document that contains portrait pages and landscape.  Use headers page-w/odd/even numbers in Gothic characters of the engraver.  When I print the Word document to Adobe Pro, it looks great on the screen, but when printed, the cast of the headers is distorted on the pages in landscape mode only.  Looks like each letter is tilted at an angle and it give it a comic effect fonts.  Portrait pages are fine.  I'm running out of ideas on how to solve this problem.  Can anyone help?

    Well, they have finished installing the XI Version and the problem is solved.  Computer scientists here are as perplexed as everyone else. They began to think it was a printer problem. But, for now, the version of the software change did the trick.  Thanks for all your ideas and suggestions.  It is good to know there are 'puzzle solvers' out there that are willing to share their time and knowledge.

  • How do I cast to the ROKU?

    How do I cast to the ROKU?

    Unfortunately, I think that it does not for the moment. In another recent thread:

    Video casting will not work because the Flash is not supported on the Roku playback devices.

    Mirroring the screen would work, but as others have said it is not functional [now] because of limitations related to the devices (roku and chromecast).

  • The spell checker in FF11 does not erase the previous words and fills the context menu

    Suggestions of preceding words are in the context menu and fill it instead to introduce myself with only one suggestion at a time. It comes from FF11

    If you start Firefox in Safe Mode, precise check work better here? It's probably an add-on of any kind interfere with normal operation.

  • The 'Search' under Edit function does not work. I can enter a search word, but nothing is selected, even if the word is on the wepage.

    I can open the function "Search" under Edit and enter a search word, but nothing has been highlighted, even if I see that the search word IS in the text on the website.

    How can I make this work again (he did until recently)?

    Firefox 3.6.17 on Windows XP SP3

    You have good match case selected in the search bar?

  • How is it when I try to open one of my favorte often visited Web sites I get a blank page with only the word 'false' in the upper left?

    How is it when I try to open one of my favorte often visited Web sites I get a blank page with only the word 'false' in the upper left?

    This just started happening the last two days.  I tried to add the url to my list to activate in Internet Options, also to accept the list for windows firewall. I rebooted and restored.

    It is annoying when I can't access Web sites on my PC.  There is no control parenting, nor is it a reason to be since I'm 57 years old, single, live alone and have no children, and not to mention that this isn't a single adult site. This is an auction site.  The same thing happens on a site of sports too.

    Hello

    Thank you for writing to Microsoft Communities.

    I understand how it could be frustrating when things do not work as expected. Please, I beg you, don't worry I'll try my best to resolve the issue.

    1. what operating system is installed on the computer?

    2. what version of Internet Explore do you use?

    3 have there been recent changes to the computer before the show?

    Please go ahead and follow the steps mentioned and later a update on the State of the question.

    Method 1: Start Internet explorer with the mode without modules and check.

    Click Start, all programs, accessories, System Tools, and click Internet Explorer (No Add-ons).

    If the problem does not persist in Internet Explorer (No Add-ons), then it is one of the Add-ons at the origin of this problem. Please follow the steps below to locate the problem the weak module:

    a. restart IE normally.

    b. click on tools.

    c. click on Manage Add-ons.

    d. disable add-ons by clicking on them one at a time to highlight and then click Disable.

    e. reactivate modules one by one and check with what add-on, you get this error message.

    f. turn off the add-on at the origin of the problem.

    For your reference: http://Windows.Microsoft.com/en-us/Windows7/Internet-Explorer-Add-ons-frequently-asked-questions

    (For Windows Vista)

    Method 2: How to optimize Internet Explorer:

    http://support.Microsoft.com/kb/936213/no

    Important: Reset Internet Explorer to its default configuration. This step will disable also any add-ons, plug-ins or toolbars that are installed. Although this solution is fast, it also means that, if you want to use one of these modules in the future, they must be reinstalled.

    Follow these recommended steps and after if you still experience the problem.

  • Grammar red line will only appear on the words misspelled on the half top of my document, but not on the bottom half how to fix this?

    Grammar red line will only appear on the words misspelled on the half top of my document, but not on the bottom half how to fix this? I am writing an essay and I know I misspelled words it contains, but the red line will not work. What should I do about it?

    Hi Brittany,

    You use Microsoft Word?

    If you use Microsoft Word, you can post your request in the Forum Office for assistance.

    Microsoft Office Forum

  • "Word cannot complete the save due to a file permission error."

    I have Windows XP.  Recently, this message appeared when I tried to save my Word documents: "Word cannot complete the save due to a file permission error."  I can always eventally the record via a temporary file, but it's very messy.  "A file permission error" - what on Earth is this?  And what should I do to get things to normal?     Ron Davis, Newcastle N.S.W..

    When you press the F8 key and access the Safe Mode start screen, use the arrow keyboard keys to select "Safe Mode with networking" and press the Enter"" key.  A list of startup items you will see on the screen, but after all that, you will get a normal login screen (except the screen may seem bigger than normal and 'Safe Mode' can appear in the corners of the screen.  At this point, log in as any user with administrator privileges.  After successfully login, you should be able to right click on a folder or file and select "Properties".  When the Properties screen, you should have a 'Security' tab at the top.

    Another approach is to use the command line command "cacls" to a normal startup that will show and allow you to set permissions on files and folders.  (Start-> Run-> "cmd") and then you can use the cacls command.  The Calc command syntax can be found here:

    <>http://TechNet.Microsoft.com/en-us/library/bb490872.aspx >

    or you can type: cacls /?

    "Cacls" allows to screw things easily and quite bad so if you can switch to the tab 'Security', which is the way to go.

    HTH,

    JW

  • I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    =================================
    Change the text wrapping...

    In Word 2007... I'm going to... Format / dressing / thanks to...

    Then I can use the arrow 4 positions to drag photos anywhere
    I chose.

    If you want to drag the photos on the page...
    I don't know how to do this. John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - to proceed at your own risk

  • error when trying to save to a flash drive "word cannot complete the save due to a file permission error.

    error when I try to record that a flash drive "word cannot complete the save due to a file permission error" (F\:filename)

    Hello

    We have recently launched a Microsoft Answers for Office forum:

    http://answers.Microsoft.com/en-us/Office/default.aspx

    Best wishes!

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I can not get internet explore and Microsoft word to stop the launch at startup.

    I looked at through these programs and autorun boot are not listed.  I checked the configuration and that they are not and I checked AVG and they do not appear as startup items.  They are not in my Start menu.  How can I get these programs STOP opening on startup?  I don't even use internet Explorer - I simply downloaded it once and now it keeps opening.  I used Word once of many weeks ago, and now it opens each time.  How can I stop this from happening?

    Hello Sarah133,

    In addition to the information that Amara has provided, please look at the suggestions below.

    You can check the boot in a few places by using MSCONFIG.
    ·       Click Start on your desktop
    ·       Type msconfig in the search box and press ENTER.
    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.
    ·       Go to the Startup tab. There are options to enable all or disable all or you can uncheck a particular program.
    Check if WinWord is set to run at startup, if so, then uncheck the box.
    Now, restart the computer and see if the word appears at the start of your computer.

    You can also check the registry to see if it is set to run at startup.
    Go to the Start button.
    In the start search, type Regedit.

    Change the settings of the REGISTRY can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the REGISTRY settings configuration can be solved. Changes to these settings are at your own risk. Please make a backup of ther registry before making any changes. Or you can create a system restore point.

    Now, you place the following keys.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

    Hkey_current_user\\software\\microsoft\\windows\\currentversion\\run
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce

    If the word is in the list, then delete this registry entry only.

    If please reply back and let us know if this helps with your question.

    Thank you

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Pdf creation from Word 2007 with the layout, the 'Landscape' Orientation and document Pages, 'two pages per sheet.

    I am trying to create a PDF from a Word 2007 document with the layout, the 'Landscape' Orientation and Pages, 'two pages per sheet.  The document was created in Word 2003.  The entire document is four "pages" long, but each of these "pages" is half of an 8 1/2 x 11.  So it's really a pages document two and prints on only two sheets of letter size paper.

    Acrobat does not seem to 'see' this document is set up to have two pages per sheet, is it really just a two-page document.  He created a four-page pdf file.

    It arrived not with Word 2003.  The pdf file created from this version is an exact copy of the document word - two pages.

    Any ideas?

    Word:

    http://answers.Microsoft.com/en-us/Office/default.aspx

    Office at the above link forums

    http://answers.Microsoft.com/en-us/Office/ee861096.aspx

    Word Help Forums at the link above.

    They will help you with your question Word when repost you in the Office Forums above.

    See you soon.

    Mick Murphy - Microsoft partner

  • I was typing an email that has been of about 200 words I hit the space bar and grabbed the next word and looked up the eyes and my email everything was gone.

    I'm at my wits end, HELP ME! I was typing an email that has been of about 200 words I hit the space bar and grabbed the next word and looked up the eyes and my email everything was gone! This happened to me several times and I can't ever find anywhere. It just disappears. Can someone help me? I want to know why he spends, how I can solve this problem how can I recover my work and where it went! I blame my laptop or windows or the manufacturer?

    I wrote a full description of my problem, but of course it also disappeared. I type 2-300 words and pooofff they disappear I can't explain it better or go on any more because I just it loose once AGAIN all! I tried to explain in more detail a related problem, but of course he gone too so I send this before I lose too.
    original title: email disappears

    The text turns blue, because you mentioned it.  The most plausible explanation to highlight all of the text while typing is due to hit CTRL-A, which is the same as Edit | Select all.  Then when you type a character when this text is highlighted, then highlighted (blue) text is replaced by the character you typed.  Be very careful to not press the CTRL key instead of the SHIFT key when you type a capital letter A or else which will never happen.

    If your cursor jumps around then also scan your system against viruses and malware.

    Steve

  • Microsoft Word pinned to the Start Menu do not open the menu in the right sidebar

    With Excel in my Start menu when I put my cursor over them or click on the right arrow all my pinned documents appear.  Microsoft Word used to do that, but now nothing happens if I put my cursor over them or click the right arrow.  He worked and suddenly stopped.  Any suggestions?  All other start icons show documents pinned and recent programs or non-Microsoft.  I tried to remove it and then put it back and restarted my computer and tried again, neither worked.  Thank you.

    ... Word used to do that, but now nothing happens if I put my cursor over them or click the right arrow. He worked and suddenly stopped...

    This seems to be a little corruption in the history of the document, but first check your Recent Documents . You decided to keep it a secret, your version of Word so here are a few tracks for Word 2007.

    With Word open to a blank document, click the Office button , then click on Word Options in the lower right. Select Advanced from the list on the left and scroll down to the section display halfway, the right pane. Check the next number of show this number of recent documents: to ensure that it is above zero. If it is zero, to increase the number to something you want to keep, and then click OK at the bottom right.

    If the show this number of recent documents: setting was already above zero, there may be a small file corruption in historical data. Frequent data section the Jump lists are stored in this folder,

    %AppData%\Microsoft\Windows\Recent\AutomaticDestinations

    Click Start or press the Windows key and type or the location of the folder in the program files , then click on paste . Then, find and delete the fle

    adecfb853d77462a.automaticDestinations - ms

    Who must provide recent documents for Word Launcher in the Start Menu. If you can't find the file, try to clear all the files and restart the computer. Subsequent use of Word and other added elements should repopulate the lists.

    • "Have you tried it turned off then on again? '-'The IT Crowd' Roy (Emmy award-winning British comedy)

Maybe you are looking for

  • C6100 not printing on network

    All computers on the network can no longer print to my C6100. I have reset the connections and I can see the printer on the network. When I ping the server for the printer page, it shows that it works correctly. Is it possible that a recent windows u

  • The computer crashes

    I had a problem with my computer freezing I have to hard start the computer when this happens. I had our it guy of my essay of work to help me remotely. He tried to connect my computer each time would freeze. I formatted my HDD and reinstalled Window

  • Need help to replace a physically C drive on several computer disks. I can't LOOSE the data on the secondary drive.

    I got 2 hard drives, a small disc with XP Pro and a big drive for storage and memory intensive programs. The disc is dead - physically (he's grinding wheels), not because of software problems. I managed to boot from the XP disk and copied as much as

  • BTTray error and much more!

    I have Vista Home Basic and receive errors BTTray. I'm unable to download software or run my McAfee. Need help as this seems to be the dominant issue. Other errors: -Internet Explorer Script error - library not found -Validation process McAfee stoppe

  • Microsoft Picture It is not compatible with Windows 7

    Original title: Microsoft "Picture It" - an excellent program to create all kinds of greeting cards, etc. I used Microsoft "Picture It" with my version of Windows XP and really liked.  When my computer crashed, I had Windows 7 with my new computer au