Changing annotations from within MS Access via VBA

I’m developing code (VBA) within MS Access to communicate with acrobat adobe. The purpose of this code is to change a particular annotation’s text and backcolor (for now). However, when I run the code the annotation property changes but it is not displayed properly. Only after I move annotation slightly then it gets refreshed (from within adobe pro). Is there a method I need to call before pddoc.save in order for it to save it correctly i.e. something similar to repaint in MS access ?
Dim pdDoc As Acrobat.AcroPDDoc
Dim pdPage As Acrobat.AcroPDPage
Dim pdAnnot As Acrobat.AcroPDAnnot
Set pdDoc = CreateObject("AcroExch.PDDoc")
pdDoc.Open ("c:\Temp\Test.pdf")
Set pdPage = pdDoc.AcquirePage(0) ' only have one page
Set pdAnnot = pdPage.GetAnnot(1) ' grab the first annotation,
pdAnnot.SetContents ("text goes here")
pdAnnot.SetColor (255) ' make it red
pdDoc.Save 1, "c:\Temp\Test.pdf"
pdDoc.Close
Set pdDoc = Nothing
BTW it works fine when the pdf is open while running the code.

Sure. You can call dbms_output.get_line to get the next line of output.
Justin

Similar Messages

  • Changing states from within a component

    Let's say that I have a TileList that is rendering data in a
    VBox. Eventually the TileList fills up and starts scrolling. I want
    to change states when clicking on item in the TileList.
    I don't want to place the click-attribute in the TileList,
    because it will change states when I am scrolling the list without
    actually selecting anything.
    I want to say click="currentState='state2'" inside the VBox,
    but that does not work because state2 is at the root level, and I
    don't know how to get to the root-level (in lack of a better word)
    from withing the component.
    This is not the proper syntax, so misunderstand me the right
    way here... Is there an equivallence to
    click="currentState='_root.state2'" in mxml?
    Thanks for any suggestions or best practices. I want the easy
    way out.
    This is the general structure...
    <mx:Application>
    <mx:states>
    <mx:State id="state1"/>
    <mx:State id="state2"/>
    <mx:State id="state3"/>
    </mx:states>
    <mx:TileList dataprovider="{...}">
    <mx:itemRenderer>
    <mx:component>
    <mx:VBox id="ClickThisBoxToChangeStates">
    <mx:Image/>
    <mx:Label/>
    </mx:Vbox>
    </mx:component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

    Your assumption is right.
    It doesn't work because there is no state2-state defined
    within the mx:component.
    In the documentation about changing states it says that I can
    go from application level and change states within a component;
    like this: click="currentState='mycomponent.anotherstate'" but not
    how I can change a state at application level from within a state.
    When I try, it says (at runtime) that the state is not defined.
    So I don't know why <mx:VBox
    click="currentState='state2'"/> doesn't work.
    I apprechiate your expertese a lot.

  • Can I change Filename from within Lightroom?

    I am in the Trial Period with Lightroom, having just used it for two days. I assume that one must be able to change a photo's filename from within Lightroom, but I surely can't see how to do it, having looked in the Help file and through all the menus.
    Here's what I'm trying to do. When I take photos, I create a descriptive filename that tells me what's in the image. Then I import a big batch. What I want to do is to create slideshows from those images in a different order from the importing order: maybe it's slide 23, then 15, then 10, etc. I was hoping to do this by sticking sort numbers on the front of the filenames (changing the filenames), and then sorting on the filenames to create the desired slideshow sequence.
    But, I can't find a way to change the filename within LR. If I do it outside LR, then I lose whatever work I've already done on the images.
    Am I overlooking some obvious better way to do this?
    Thanks
    Bob Chapman
    I'm running LR 1.2, Windows XP, 2 GB RAM, big disks.

    Even easier, select the image or images and press F2 to rename.<br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />> Hi Bob,<br />><br />> To change the filename for an individual file select the file from grid <br />> view and look over at the Metadata panel on the right side of the screen. <br />> Click on the filename in the metadata panel and it should change <br />> appearance to show that it can now be edited. Type Away!<br />><br />> BTW, If you are planning to make the slideshow using the LR Slideshow <br />> module, the easiest way (for me at least) is to put the slides that are <br />> going into the ss into a Collection. (Yep, time to read up on collections <br />> :) Then you can manually order the slides however you want, select them <br />> all, and use the ss Module to create the ss.<br />><br />> Enjoy!

  • How to disconnect from a App/DB via VBA

    HiI'd like to be able to diconnect from an Application/Database with VBA without the Essbase Disconnect window appearing. I know the active Application/Database and I've tried using the EsbClearActive, EsbLogout and EsbTerm API calls but this still does not connect from the Essbase Server.Thanks in advanceBest regardsKM

    You might want to try getting the context handle from the sheet you are currently connected to. Use the hCtx = EssVGetHctxFromSheet("sheet"), then you can use sts = EsbListConnections(hCtx, iItems) to get the active connections and log out the connection that you would like to log out. Also you can try selecting the active sheet by using Sheet("sheet").select the using x = EssVDisconnect(Null).Hope this helps.Jason HjortenAspirity [email protected]

  • Changing CLASSPATH from within a program

    i need to start rmi registry in my program and i want is to bind to the right CLASSPATH. i know how to do it from the command line, but how do i set it from the program

    i need to start rmi registry in my program and i want
    is to bind to the right CLASSPATH. i know how to do
    it from the command line, but how do i set it from the
    programYou can't change it. Your choices for loading libraries
    1. Use classpath (either env var or command line option)
    2. Use the ext directory.
    3. Use a custom class loader - as the previous poster suggested.

  • When creating a Change Request from within an Incident - Can Pull in the Information from the Inicdent?

    My users are currently creating a lot of Change Requests, and we have templates. What they want to do is to pull in the relevant information from the Incident like title, description, attachments, affected user, etc. I have seen similar things where people
    are changing an incident to a service request, and wondered if it were possible to do it from Incident to Change...
    http://gallery.technet.microsoft.com/Create-Incident-from-f19aaea0/view/Discussions

    iPhoto puts them in the book in chronological order.  So to get your photos from an album into an iPhoto book in the same order you will need to use the Photos ➙ Batch Change ➙ Date menu option and set them all to the same date with a 1 minute time difference between each. 
    OT

  • Connecting Microsoft Access with Primavera via VBA

    I'm Primavera expert and Microsoft Access as well
    I want to know where to start to learn how can I establish a connection or session with Primavera from Microsoft Access via VBA.
    Thank you
    Emad

    Hello,
    I'm not familiar with Primavera P6 and Access. May be you should post the question in the
    Oracle Primavera forum.
    The following thread is about similar issue, you can try to use primavera SDK provider or ODBC connection:
    http://www.planningplanet.com/forums/planning-scheduling-programming-discussion/527878/primavera-p6-software-development-kit-sdk
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • I have a new printer which behaves OK except it will not print directly from a web site accessed via Firefox. We do not have this problem if accessed via another browser. Suggestions?

    New printer is Brother MFCJ615W. OS is XP. Computer is quite old Dell. Printer also refuses to print pictures from .jpg files - but the fact that I can print direct from web sites accessed via another browser suggests some of the problem is with Firefox. I asked this a few days ago and got an email reply giving me a link to click on - but this only produced an error message.

    I think I solved the wifi connection problem, just by switching off completely the router! sounds trivial, but in this case it worked!!!
    the funny behaviour of the trackpad/cursor still persists. any suggestion???
    thanks again

  • Calling subvis dynamicall​y from within an exe (avoiding error 1003)

    Hi,
    I'm using an architecture where the main program (compiled to an exe) can be supplied with user-"plugins" that are collections of vis of specific types inside a specially named folder relative to the exe. They can be called from within the exe via "open vi reference" supplied by the corresponding strict vi types and the corresponding relative paths.
    I want to avoid having to include any of the plugins in any way in the application builder, since users should be able to create own plugins that the application is totally unaware of during build.
    In principle this approach works quite well, since these plugins are not extremely complex, but occasionally I get an error 1003 when loading a plugin.
    I've read many old posts about this error in this particular situation, mostly using LV versions 7 or 8 (I'm using 2012). One suggestion was to build a source distribution for every plugin, including everything that is used from vi.lib, instr.lib, and user.lib. This indeed helped in my particular case - however, it bloats the plugin "distribution" (which consists originally only of a couple of user vis) extremely and makes user-side developement more complicated.
    Now some plugins run nicely from within the exe without having to build a source distribution for them (they still use many vi.lib vis) while others don't and I have no clue why...
    These plugins are wrappers for hardware drivers which allow controlling any hardware instrument from within the main application through a certain API. So, in a particular case, a plugin which produced error 1003 is using VISA serial functions (all inside ...\vi.lib\Instr\_visa.llb) and one without error doesn't (yet it uses many functions from ...\vi.lib\Utility\...).
    I can fix the VISA-problem in a simple way by including (only) the used VISA-vis (and typedefs) inside the plugin's folder and explicitely link to them (i.e. replace the VISA-vis from vi.lib with the copied ones in the plugin's folder - I guess this is also what the source distribution does).
    However, I'm confused why some plugins with linked vi.lib vis work while others produce an error 1003 unless those particular vis are explicitely distributed and linked with them...
    Oh and just for completeness: All plugins work fine if called from within the developement system, the problem occurs only if called from within an exe.
    Solved!
    Go to Solution.

    There are some VIs in vi.lib that call other VIs dynamically.  Sometimes you have to explicitly add these to the EXE or distribution.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to enable JMS to be J2EE Compliant from within JVM

    I am wondering how I can use JMS in J2EE compliant mode from within the JVM via a Java stored procedure.
    I know that I can set a property (i.e. oracle.jms.j2eeCompliant="true") at execution time, but was wondering how I can make the entire JVM J2EE compliant.

    You cannot make the JVM J2EE compliant! However, you can use some J2EE APIs such as JMS, on top of J2SE.
    See a basic use of JMS in Java stored procedure
    http://otn.oracle.com/sample_code/tech/java/jsp/samples/jms/Readme.html
    Note: the main purpose of JMS support within the database is to integrate with AQ.
    Kuassi

  • Problem with controlling Annotations from Excel VBA

    Hi,
    I have a PDF document that has plenty of sticky notes attached to it. These sticky notes have been added by multiple authors on all pages of the document. I am trying to import the contents of these sticky notes, their author and the page number to an excel spreadsheet.  I am using Excel 2007 and Acrobat Professional 9.0.
    This is the code that I am currently using to import the sticky notes, but the problem that I am facing is that when I run the macro -
    Same sticky note contents, author and page numbers are imported multiple times
    Not all sticky notes are imported, only some of them appear in the final excel spreadsheet
    When I compare the number of sticky notes to that in the original PDF file, the number is correct. But the content is repeated content and that is the reason why only some of the sticky notes are imported.
    This is an activity that I need to do on regular basis and the number of sticky notes that I need to import to excel may range between 100 to 200. It is really difficult to do this task manually, so an excel VBA macro could prove really helpful.
    Sub ImportComments_Click()
    Dim Fpath As String
    Dim WordObj As Object
    Dim wbkOutput As Excel.Workbook
    Dim iRow As Integer
    Dim i, j, k As Integer
    Dim lRet As Long
    Dim objAcroAVDoc As New Acrobat.acroAVDoc
    Dim objAcroPDDoc As Acrobat.AcroPDDoc
    Dim numPages As Long
    Dim lAnnotscnt As Long
    Dim Subtype As String
    Dim NumComments As Long
    Dim AcroApp As Acrobat.AcroApp
    Dim objAcroPDPage As Acrobat.AcroPDPage
    Dim annot As Acrobat.AcroPDAnnot
    Sheets("Defect Log").Select
    Range("L3").Activate
    Fpath = ActiveCell.Value
    Sheets("Defect Log").Select
    Range("A1").Activate
    i = 0
    Do While (Not (IsEmpty(ActiveCell.Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 1).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 2).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 3).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 4).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 5).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 6).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 7).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 8).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 9).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 10).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 11).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 12).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 13).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 14).Value)))
    i = i + 1
    ActiveCell.Offset(1, 0).Select
    Loop
    iRow = i + 1
    Set wbkOutput = ActiveWorkbook
    lRet = objAcroAVDoc.Open(Fpath, "")
    Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
    numPages = objAcroPDDoc.GetNumPages()
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(0)
    For k = 1 To numPages
    lAnnotscnt = objAcroPDPage.GetNumAnnots()
    For m = 0 To lAnnotscnt - 1
    If lAnnotscnt = 0 Then Exit For
    Set objAcroPDAnnot = objAcroPDPage.GetAnnot(m)
    If (objAcroPDAnnot.GetContents <> "" And objAcroPDAnnot.GetSubtype = "Text") Then
    Cells(iRow, 5).Value = k
    Cells(iRow, 2).Value = objAcroPDAnnot.GetContents()
    Cells(iRow, 11).Value = objAcroPDAnnot.GetTitle()
    iRow = iRow + 1
    End If
    Next m
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(k)
    Next k
    lRet = objAcroAVDoc.Close(1)
    Set objAcroAVDoc = Nothing
    Set objAcroPDAnnot = Nothing
    Set objAcroPDPage = Nothing
    Set objAcroPDDoc = Nothing
    End Sub

    Make sure you are current with 9.x patches, just on general principles.
    The code seems fine – nothing jumping out at me.
    You can also look at using the JSObject methods and trying this via the JavaScript stuff – that will give you more access to the Annotation information…
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 24 Nov 2011 04:25:12 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problem with controlling Annotations from Excel VBA
    Problem with controlling Annotations from Excel VBA
    created by apreeti<http://forums.adobe.com/people/apreeti> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044740#4044740

  • Accessing ribbon via vba ApplicationOptionsDialog

    hi,
    I am using microsoft access 2010 project (adp). I need to disable the file menu when I distribute the ade to
    clients.
    the backstage disable has no effect. my customized ribbon below. I only need to a way via vba to turn off the
    ApplicationOptionsDialog button! thanks!
    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon startFromScratch="true">
    <tabs>
    <tab idMso="TabExternalData" visible="false" /> <tab idMso="TabCreate" visible="false" />
    <tab idMso="TabDatabaseTools" visible="false" /> <tab idMso="TabHomeAccess" visible="false" />
    </tabs>
    </ribbon>
    <backstage>
    <tab idMso="TabInfo" visible="false"/>
    <button idMso="FileSave" visible="false"/>
    <button idMso="SaveObjectAs" visible="false"/>
    <button idMso="FileOpenDatabase" visible="false"/>
    <button idMso="FileCloseDatabase" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>

    One thing to remember is that backstage commands ONLY work for the system wide ribbon. In other words, you cannot place backstage commands in a ribbon assigned to a given form/report.
    And as noted here, your schema definition needs to be changed from:
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    To
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    As a general rule, the older ribbon format will work, but not if you using new 2010 features. So backstage commands ONLY work in the application wide ribbon specified for startup. And you need to use the 2009 schema as opposed to 2006 schema.
    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada

  • Cannot access Dynamics XRM from within Event Receiver

    Hello everyone
    I'm struggling with an issue here and I would like to hear some advice from you. The problem is the following:
    I need to do something on Dynamics CRM whenever a document is uploaded to a specific location in SharePoint. I'm using an Event receiver for this purpose and connecting to CRM via the IOrganizationService, like this:
    IOrganizationService service = new OrganizationServiceProxy(serviceUri, null, credentials, null); //service uri is https//serviceUri is something like "https://crmserver/organization/XRMServices/2011/Organization.svc"
    But for some reason I'm unable to execute that line successfully (looks like it times out) from within the Event receiver. However, the same exact piece of code works perfectly fine if executed from a separate console application (i.e., outside the IIS application
    pool) running on the same SharePoint server...I'm confused, do I need to configure anything else on the SharePoint application pool so it let's me access the XRM service?
    More info:
    - It's not credentials issue, even provinding hardcoded it doesn't work
    - Both SharePoint 2013 and Dynamics CRM 2013 are on premises.
    - Integration between SharePoint and Dynamics CRM is done through the CRM List Component, over https, and it's working fine.This is not really important for this but it's just to tell that both servers can comunicate over https.
    I would really like to get some advice on this. Thank you in advance.
    Regards

    Hi,
    Per my understanding, there is an issue when trying to access Dynamic CRM in an Event Receiver.
    As you said, the same code works in a Console Application, it means the code should be OK. To narrow down the issue, I suggest you do as follows:
    1. Please debug this Event Receiver in Visual Studio to see if the Event Receiver is working, what’s more, it will give you more information about how the code works
    or if there is any exception thrown during debugging;
    2. Is it a Sandboxed solution? Sometimes
    the limitation of a Sandboxed solution would interrupt the code execution, you can try to change it to “Farm” solution and make another test;
    3. If the above steps not work for you, please trace the requests using Fiddler when the Event Receiver running, more details there would help you easier to find out
    the root cause of this issue.  
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • WPF UI running in seperate runspace - able to set/get controls via synchronized hash table, but referencing the control via the hash table from within an event handler causes both runspaces to hang.

    I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
    to see if anyone had a suggestion.
    My goals are as follows:
    1.) Set control properties from the primary runspace (Completed)
    2.) Get control properties from the primary runspace (Completed)
    3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
    I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
    runspaces. As a result, I am unable to update the form based on an event being fired by a control.
    In the example below, the form is loaded and the following steps occur:
    1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
    2.) update-textbox is called and sets the Text property of the textbox.
    3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
    4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
    5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
    unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
    $UI_JobScript =
    try{
    Function New-Form ([XML]$XAML_Form){
    $XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
    [Windows.Markup.XamlReader]::Load($XML_Node_Reader)
    try{
    Add-Type –AssemblyName PresentationFramework
    Add-Type –AssemblyName PresentationCore
    Add-Type –AssemblyName WindowsBase
    catch{
    Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
    $Form = New-Form -XAML_Form $SyncHash.XAML_Form
    $SyncHash.Form = $Form
    $SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
    $SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
    $SyncHash.Form.ShowDialog() | Out-Null
    $SyncHash.Error = $Error
    catch{
    write-host $_.Exception.Message
    #End UI_JobScript
    #Begin Main
    add-type -AssemblyName WindowsBase
    [XML]$XAML_Form = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    <DataTemplate x:Key="DTMPL_Name">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    </Window.Resources>
    <DockPanel LastChildFill="True">
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
    <Label Name="LBL_Services" Content="Services:" />
    <ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
    </StackPanel>
    <TextBox Name="TXT_Output"/>
    </DockPanel>
    </Window>
    $SyncHash = [hashtable]::Synchronized(@{})
    $SyncHash.Add("XAML_Form",$XAML_Form)
    $SyncHash.Add("InitialScript", $InitialScript)
    $Normal = [System.Windows.Threading.DispatcherPriority]::Normal
    $UI_Runspace =[RunspaceFactory]::CreateRunspace()
    $UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
    $UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
    $UI_Runspace.Open()
    $UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
    $UI_Pipeline = [PowerShell]::Create()
    $UI_Pipeline.Runspace=$UI_Runspace
    $UI_Pipeline.AddScript($UI_JobScript) | out-Null
    $Job = $UI_Pipeline.BeginInvoke()
    $SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
    Function Update-Combobox{
    write-host "`nBegin Update-Combobox [$(get-date)]"
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
    write-host "`End Update-Combobox [$(get-date)]"
    Function Update-Textbox([string]$Value){
    write-host "`nBegin Update-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
    write-host "End Update-Textbox [$(get-date)]"
    Function Read-Textbox(){
    write-host "`nBegin Read-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
    $Global:Return
    remove-variable -Name Return -scope Global
    write-host "End Read-Textbox [$(get-date)]"
    #Give the form some time to load in the other runspace
    $MaxWaitCycles = 5
    while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
    Start-Sleep -Milliseconds 200
    $MaxWaitCycles--
    Update-ComboBox
    Update-Textbox -Value $("Initial Load: $(get-date)")
    Write-Host "Value Read From Textbox: $(Read-TextBox)"
    Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}

    Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
    To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
    the main runspace update the form in the UI runspace.
    ex:
    1.) User changes selection on combo box generating form event
    2.) Event calls delegate (which I have gotten to work)
    3.) Delegate does some basic processing (works)
    4.) Delegate attempts to update form in UI runspace (hangs)
    As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?

  • How to remove Access 2007 (MDB) project from Team Foundation using VB6/VBA?

    Hi,
    is there any way how to remove A2007 (MDB) project from Team Foundation using VB6 or VBA? CompactDatabase method doesn't seem to help.
    I need to remove back-end MDBs before deploying the whole project. In other words, the MDBs themselves should remain in TF but I'd like to remove their copies that should be deployed (distribution set). I wrote a simple function for compacting MDBs but it
    doesn't do the trick. When I compact an MDB in Access 2007 I'm always asked whether I want to remove it from source control.
    Thank you very much in advance.

    What are the copies you referring?
    These are physical copies of local MDB files. I can't (don't want) to deploy MDB files that are handled by source code control (SCC) since those files hold information about SCC (local directory mapping). Users might not understand the message they get when
    they open such MDB in Access, eg.:
    This database was named 'C:\Projekty\P1\DB\nP01.mdb' but has been moved, copied, or renamed. Source code control features will be disabled.
    That's why I want to remove the SCC information from MDB files. The only way I know so far is to use "Compact & Repair database" in MS Access 2007. I'd like to point you to http://msdn.microsoft.com/en-us/library/aa155494%28v=office.10%29.aspx (it's
    similar to Access 2007 & Team Foundation):
    Using the Compact Database Command
    In order to take a database that is under source code control and deliver it to a user, you need a way to cut the database's ties to source code control. When you compact a database that is under source code control, Microsoft Access 2000 prompts you
    to remove the database from source code control.
    To remove the database from source code control, Microsoft Access simply removes the Visual SourceSafe properties from the Microsoft Access database and its objects.
    I would like to remove Access MDBs from SCC programmatically so that I can
    significantly reduce time that I spend on deploying the application. In one of our applications there are five back-end MDBs that are under SCC and it takes some time to remove them from
    SCC manually. I have to do it anytime we release new version, even for releases that are determined as testing releases for internal testing within our company.
    Thank you very much for your time.

Maybe you are looking for