21. juni 2002 - 12:22Der er
9 kommentarer og 1 løsning
outputto - Output formater er væk??
Hej Access XP, filformat Access 2000. XP-Platform
Jeg har på et tidspunkt lavet en makro som skriver en forespørgsel til en rtf-fil via metoden OutputTo. Nu for jeg en fejl fordi der i forbindelse med makroen er tomt under filtyper. Windows siger at jeg skal rette problemet i registreringsdatabasen. Jeg har prøvet at oprette en ny database, heri virker makroen fint. Derefter prøvede jeg at importere alle objekter til en ny database, men så virker makroen ikke. Der er bygget sikkerhed ind i databasen, derfor er eneste fællesnævner den mdw-fil som de benytter. Er der nogen der har oplevet noget lignende og har et svar?
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
If you are using security then I dont think you can just import objects into a new dB it giving problems! Both the MDB and the MDW file hold information concerning security and if you copy object to another dB I DO NOT think that any security infromation is copied. But then it depends on a number of things!
DoCmd.OutputTo acOutputQuery, "YourQuery", acFormatRTF, "C:\TheFile.rtf", True True at the end opens the file in Word if you change this to False then it doesnt
Torben>as I mentioned, I VERY MUCH DOUBT that you can import objects from a secure database into a none secure database! I am sur ethat IF you create the macro manually then it will work but because there is security on the database you are importing from then it isnt allowing you to, which in my mind is correct!
Giv brugeren admin fulde rettigheder i den db du eksporterer fra, og importer i den nye db under samme bruger, så mener jeg at man kan være sikker på at eksport/import skulle være ok.
To terry: Maybe I wasn´t precise enough. I am not trying to import from a database. I have created the macro in the database (I am the owner of it). I have logged on to the system (Windows XP, no server just a stand-alone pc). I have administrators rights to the computer. The reson why I tryed from a non-secure database was only to see if there was a difference. The problem is, that if I, in Word, try mail-merge (brevfletning) to a query, I am promted for a password to the database, because the computer opens a new session to the database. Therefore I wanted to export the result of the query to a RTF-file, which then could be used as a datasource for the mailmerge. Could a make the mail-merge more efficient in another way?
Hi I'm a bit puzzled! In your last comment (11:43:00) you say "Could a make the mail-merge more efficient in another way?" Are you saying that the ORIGINAL QUESTION is no longer a problem and that you only want to make the macro more efficient in the secure (original) database?
I dont know much about Word OR mailmerge, but I am sure that you should be able to make a connection to the Access database (from Word) and give the loggin necessary. This will in my oppinion be the best solution, it would save you having to export to an RTF file.
If you problem STILL is because you CAN NOT get it to work in the copy (non secure) database then I suggest that you create the macro and all the other objects BY HAND, do NOT import them from the secure database. Then see if it works and IF it does then it IS because you CAN NOT copy objects from a secure dB into a non secure dB without consequences!
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.