Besoin d aide

VJR

Well-Known Member
Hi elhamdouni.dina,

I don't think there is any direct way in the Word VBO to save the file to HTML.
However you can create a new Action page by making a copy of the existing 'Save As' page in the MS Word VBO.
Rename the page name and Code Stage to 'Save As - HTML' or to whatever you'd like.

Change the code stage to below:
Dim doc as Object = GetDocument(handle,documentname)
doc.SaveAs(Filename:=filename, FileFormat:= 8)
newname = doc.name

The file format of 8 is the numeric constant for HTML.
 

VJR

Well-Known Member
hi, plz how can i extract years from a word file using code with blue prism

Hi elhamdouni.dina,
If there is date in the Word file in any particular format then you need to fetch that date from the file and then make use of the FormatDate function to get only the years.
 
Hi elhamdouni.dina,

I don't think there is any direct way in the Word VBO to save the file to HTML.
However you can create a new Action page by making a copy of the existing 'Save As' page in the MS Word VBO.
Rename the page name and Code Stage to 'Save As - HTML' or to whatever you'd like.

Change the code stage to below:
Dim doc as Object = GetDocument(handle,documentname)
doc.SaveAs(Filename:=filename, FileFormat:= 8)
newname = doc.name

The file format of 8 is the numeric constant for HTML.
thank you VJR , actually it works without using code....i used AA Spy mode .
 
[QUOTE = "VJR, poste: 2586, membre: 597"] Salut elhamdouni.dina,
S'il existe une date dans le fichier Word dans un format particulier, vous devez récupérer cette date dans le fichier, puis utiliser la fonction FormatDate pour obtenir uniquement les années. [/ QUOTE]
i dont know how to extract years from word file using code stage in blueprism ,,, i have no idea
 

VJR

Well-Known Member
Hi elhamdouni.dina,

You mentioned you are going to spy the html version of the word file.
So after you read the element that contains the year into a data item using the read stage, use the FormatDate function on the data item.
 
[QUOTE = "VJR, poste: 2593, membre: 597"] Salut elhamdouni.dina,

Vous avez mentionné que vous allez espionner la version html du fichier word.
Donc, après avoir lu l'élément qui contient l'année dans un élément de données en utilisant l'étape de lecture, utilisez la fonction FormatDate sur l'élément de données. [/ QUOTE]
now i will not use the html mode , i want just to use the code to gain time
 

cs.andras

Active Member
Yes the code I have responded to elhamdouni.dina is the working one.
That's not what I meant. If you want to quote some code in your post and you don't want the forum to apply formatting automatically to it, use the insert menu and code or inline code (the insert menu is the "..." labelled menu in the WYSIWYG editor. (=What You See Is What You Get)
This is an inline code.

PHP:
<?php
echo "This is an example PHP code, syntax highlight and everything.";
?>
 

VJR

Well-Known Member
ah, a good candidate for one statement with multiple meanings :). There I see the Insert menu "..." with the Code. Cheers!
 
Est-ce que quelqu'un sait comment puis-je utiliser ce code dans BlurPrism afin que je puisse convertir un fichier Word en fichier TXT.



<<< le code >>>


Dim wApp = Nouveau Word.Application

Dim wDoc = wApp.Documents.Open (nomFichier: = "fichier.doc", readonly = Vrai)

wDoc.SaveAs ("fichier.txt", Word.WdSaveFormat.wdFormatDOSText)

wApp.Quit ()
 

VJR

Well-Known Member
Est-ce que quelqu'un sait comment puis-je utiliser ce code dans BlurPrism afin que je puisse convertir un fichier Word en fichier TXT.



<<< le code >>>


Dim wApp = Nouveau Word.Application

Dim wDoc = wApp.Documents.Open (nomFichier: = "fichier.doc", readonly = Vrai)

wDoc.SaveAs ("fichier.txt", Word.WdSaveFormat.wdFormatDOSText)

wApp.Quit ()

Hi elhamdouni.dina,

Follow steps as mentioned in this post (#22 on this page).
http://www.rpaforum.net/threads/besoin-d-aide.869/post-2584

Only change the file format parameter to 2.

doc.SaveAs(Filename:=filename, FileFormat:= 2)
 
Last edited:

VJR

Well-Known Member
Code:
Dim doc as Object = GetDocument(handle,documentname)
    doc.SaveAs(Filename:=filename, FileFormat:= 2)
    newname = doc.name


The output after running the code stage will be as follows:

Inut and Output.JPG
 
[QUOTE = "VJR, post: 2821, membre: 597"]
Code:
 Dim doc en tant qu'objet = GetDocument (handle, documentname)
    doc.SaveAs (Filename: = filename, FileFormat: = 2)
    nouveau nom = doc.name [/ CODE]


La sortie après l'exécution de l'étape de code sera la suivante:

[ATTACH=full]550[/ATTACH][/CITATION]
thank youuuuuuuuuuuu
 

VJR

Well-Known Member
Hi elhamdouni.dina,

You can loop through the collection and if the code finds nothing in the collection field then delete that row using 'Remove Row' action of 'Collection' VBO (and not the 'Utility - Collection Manipulation').
 
Last edited:
[QUOTE = "bharadwaj813, poste: 2918, membre: 863"] Vous avez une action directe appelée "Ligne vide supprimée" dans Collection manipulation VBO. [/ QUOTE]
tank youuuuuuuuuu
 
Top